Print this page
11210 libm should be cstyle(1ONBLD) clean
*** 20,29 ****
--- 20,30 ----
*/
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/
+
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
*** 44,63 ****
*/
#include "libm.h"
long long
! llrint(double x) {
/*
* Note: The following code works on x86 (in the default rounding
* precision mode), but one should just use the fistpll instruction
* instead.
*/
union {
unsigned i[2];
double d;
} xx, yy;
unsigned hx;
xx.d = x;
hx = xx.i[HIWORD] & ~0x80000000;
--- 45,66 ----
*/
#include "libm.h"
long long
! llrint(double x)
! {
/*
* Note: The following code works on x86 (in the default rounding
* precision mode), but one should just use the fistpll instruction
* instead.
*/
union {
unsigned i[2];
double d;
} xx, yy;
+
unsigned hx;
xx.d = x;
hx = xx.i[HIWORD] & ~0x80000000;
*** 73,79 ****
yy.i[LOWORD] = 0;
x = (x + yy.d) - yy.d;
}
/* now x is nan, inf, or integral */
! return ((long long) x);
}
--- 76,82 ----
yy.i[LOWORD] = 0;
x = (x + yy.d) - yy.d;
}
/* now x is nan, inf, or integral */
! return ((long long)x);
}