Skip to content

Commit a723a70

Browse files
futogkeith-packard
authored andcommitted
libm/math: Adjust log1pf to binary32
The threshold for approximating log(1 + x) with the first element(s) of its Taylor-series has been adjusted to binary32.
1 parent 4bcd8c3 commit a723a70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

newlib/libm/common/sf_log1p.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ log1pf(float x)
4747
else
4848
return __math_invalidf (x); /* log1p(x<-1)=NaN */
4949
}
50-
if(ax<0x31000000) { /* |x| < 2**-29 */
51-
if(ax<0x24800000) /* |x| < 2**-54 */
50+
if(ax<0x39000000) { /* |x| < 2**-13 */
51+
if(ax<0x32800000) /* |x| < 2**-26 */
5252
return __math_inexactf(x);
5353
else
5454
return __math_inexactf(x - x*x*(float)0.5);

0 commit comments

Comments
 (0)