Print this page
11210 libm should be cstyle(1ONBLD) clean
@@ -16,13 +16,15 @@
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
+
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -119,17 +121,18 @@
hx = *(int *)&x;
ix = hx & ~0x80000000;
if (ix >= 0x7f800000) /* nan or inf */
- return ((hx < 0)? x * 0.0f : x * x);
+ return ((hx < 0) ? x * 0.0f : x *x);
exp = 0;
+
if (hx < 0x00800000) { /* negative, zero, or subnormal */
if (hx <= 0) {
f = 0.0f;
- return ((ix == 0)? -1.0f / f : f / f);
+ return ((ix == 0) ? -1.0f / f : f / f);
}
/* subnormal; scale by 2^149 */
f = (float)ix;
ix = *(int *)&f;