summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/msun/src/s_cbrtf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/msun/src/s_cbrtf.c b/lib/msun/src/s_cbrtf.c
index 5fcd795..ea7b3cd 100644
--- a/lib/msun/src/s_cbrtf.c
+++ b/lib/msun/src/s_cbrtf.c
@@ -41,11 +41,11 @@ cbrtf(float x)
sign=hx&0x80000000; /* sign= sign(x) */
hx ^=sign;
if(hx>=0x7f800000) return(x+x); /* cbrt(NaN,INF) is itself */
- if(hx==0)
- return(x); /* cbrt(0) is itself */
/* rough cbrt to 5 bits */
- if(hx<0x00800000) { /* subnormal number */
+ if(hx<0x00800000) { /* zero or subnormal? */
+ if(hx==0)
+ return(x); /* cbrt(+-0) is itself */
SET_FLOAT_WORD(t,0x4b800000); /* set t= 2**24 */
t*=x;
GET_FLOAT_WORD(high,t);
OpenPOWER on IntegriCloud