summaryrefslogtreecommitdiff
path: root/libm/s_log1p.c
diff options
context:
space:
mode:
Diffstat (limited to 'libm/s_log1p.c')
-rw-r--r--libm/s_log1p.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libm/s_log1p.c b/libm/s_log1p.c
index 683026b54..d48c3ef7a 100644
--- a/libm/s_log1p.c
+++ b/libm/s_log1p.c
@@ -159,8 +159,9 @@ static double zero = 0.0;
}
hfsq=0.5*f*f;
if(hu==0) { /* |f| < 2**-20 */
- if(f==zero) if(k==0) return zero;
+ if(f==zero) {if(k==0) return zero;
else {c += k*ln2_lo; return k*ln2_hi+c;}
+ }
R = hfsq*(1.0-0.66666666666666666*f);
if(k==0) return f-R; else
return k*ln2_hi-((R-(k*ln2_lo+c))-f);