From 2ca180e97a16f3ee3ec9e7e5a5fb7eda3d863a02 Mon Sep 17 00:00:00 2001 From: Stefan Liebler Date: Tue, 29 Apr 2014 15:43:36 +0200 Subject: [BZ #16823] Fix log1pl returning wrong infinity sign --- sysdeps/ieee754/flt-32/s_log1pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdeps/ieee754/flt-32/s_log1pf.c') diff --git a/sysdeps/ieee754/flt-32/s_log1pf.c b/sysdeps/ieee754/flt-32/s_log1pf.c index 0307277106..5f00febc04 100644 --- a/sysdeps/ieee754/flt-32/s_log1pf.c +++ b/sysdeps/ieee754/flt-32/s_log1pf.c @@ -42,7 +42,7 @@ __log1pf(float x) k = 1; if (hx < 0x3ed413d7) { /* x < 0.41422 */ if(ax>=0x3f800000) { /* x <= -1.0 */ - if(x==(float)-1.0) return -two25/(x-x); /* log1p(-1)=+inf */ + if(x==(float)-1.0) return -two25/zero; /* log1p(-1)=-inf */ else return (x-x)/(x-x); /* log1p(x<-1)=NaN */ } if(ax<0x31000000) { /* |x| < 2**-29 */ -- cgit 1.4.1