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,58 ****
*/
#include "libm.h"
double
! __frexp(double x, int *exp) {
union {
unsigned i[2];
double d;
} xx, yy;
double t;
unsigned hx;
int e;
xx.d = x;
--- 45,61 ----
*/
#include "libm.h"
double
! __frexp(double x, int *exp)
! {
union {
unsigned i[2];
double d;
} xx, yy;
+
double t;
unsigned hx;
int e;
xx.d = x;
*** 62,71 ****
--- 65,75 ----
*exp = 0;
return (x);
}
e = 0;
+
if (hx < 0x00100000) { /* x is subnormal or zero */
if ((hx | xx.i[LOWORD]) == 0) {
*exp = 0;
return (x);
}
*** 87,97 ****
yy.i[LOWORD] = xx.i[LOWORD];
t = yy.d;
yy.i[HIWORD] = 0x43300000;
yy.i[LOWORD] = 0;
t -= yy.d; /* t = |x| scaled */
! xx.d = ((int)xx.i[HIWORD] < 0)? -t : t;
hx = xx.i[HIWORD] & ~0x80000000;
e = -1074;
}
/* now xx.d is normal */
--- 91,101 ----
yy.i[LOWORD] = xx.i[LOWORD];
t = yy.d;
yy.i[HIWORD] = 0x43300000;
yy.i[LOWORD] = 0;
t -= yy.d; /* t = |x| scaled */
! xx.d = ((int)xx.i[HIWORD] < 0) ? -t : t;
hx = xx.i[HIWORD] & ~0x80000000;
e = -1074;
}
/* now xx.d is normal */