Print this page
11210 libm should be cstyle(1ONBLD) clean

*** 16,28 **** --- 16,30 ---- * 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. */
*** 31,52 **** #include "libm.h" static const float zero = 0.0f; float ! log1pf(float x) { int ix; ix = *(int *)&x; if (ix >= 0x7f800000) { /* x is +inf or nan */ return (x * x); } if (ix < 0) { ix &= ~0x80000000; if (ix == 0x3f800000) /* x is -1 */ return (x / zero); if (ix > 0x3f800000) /* x is < -1 or nan */ return ((x * zero) / zero); } return ((float)log1p((double)x)); } --- 33,60 ---- #include "libm.h" static const float zero = 0.0f; float ! log1pf(float x) ! { int ix; ix = *(int *)&x; + if (ix >= 0x7f800000) { /* x is +inf or nan */ return (x * x); } + if (ix < 0) { ix &= ~0x80000000; + if (ix == 0x3f800000) /* x is -1 */ return (x / zero); + if (ix > 0x3f800000) /* x is < -1 or nan */ return ((x * zero) / zero); } + return ((float)log1p((double)x)); }