mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
Don't generate underflow for very small values in log1pl.
* sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl): If xm1 is smaller than LDBL_EPSILON/2.0L, just return xm1.
This commit is contained in:
parent
bcbf9830b7
commit
447885ebf1
@ -1,3 +1,8 @@
|
||||
2012-11-16 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl): If xm1 is
|
||||
smaller than LDBL_EPSILON/2.0L, just return xm1.
|
||||
|
||||
2012-11-16 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elf/tst-array1.c (init): Set constructor priority to 1000.
|
||||
|
@ -138,6 +138,12 @@ __log1pl (long double xm1)
|
||||
&& (u.parts32.w1 | u.parts32.w2 | u.parts32.w3) == 0)
|
||||
return xm1;
|
||||
|
||||
if ((hx & 0x7fffffff) < 0x3f8e0000)
|
||||
{
|
||||
if ((int) xm1 == 0)
|
||||
return xm1;
|
||||
}
|
||||
|
||||
x = xm1 + 1.0L;
|
||||
|
||||
/* log1p(-1) = -inf */
|
||||
|
Loading…
Reference in New Issue
Block a user