Print this page
11210 libm should be cstyle(1ONBLD) clean
@@ -20,25 +20,28 @@
*/
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/
+
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma weak frexpf = __frexpf
#include "libm.h"
float
-__frexpf(float x, int *exp) {
+__frexpf(float x, int *exp)
+{
union {
unsigned i;
float f;
} xx;
+
unsigned hx;
int e;
xx.f = x;
hx = xx.i & ~0x80000000;
@@ -47,18 +50,19 @@
*exp = 0;
return (x);
}
e = 0;
+
if (hx < 0x00800000) { /* x is subnormal or zero */
if (hx == 0) {
*exp = 0;
return (x);
}
/* normalize x by regarding it as an integer */
- xx.f = (int) xx.i < 0 ? -(int) hx : (int) hx;
+ xx.f = (int)xx.i < 0 ? -(int)hx : (int)hx;
hx = xx.i & ~0x80000000;
e = -149;
}
/* now xx.f is normal */