aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-96/e_jnl.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2012-07-12 16:34:47 +0200
committerMarek Polacek <polacek@redhat.com>2012-07-12 16:34:47 +0200
commit541428fecf21cdde271acbd280c53bfe5beaafe2 (patch)
treed13200f5cd7cbd3cef57ec86ebddc2e72544909e /sysdeps/ieee754/ldbl-96/e_jnl.c
parentec332e944f4503b8e0f8fd5ae63384f82e528959 (diff)
downloadglibc-541428fecf21cdde271acbd280c53bfe5beaafe2.zip
glibc-541428fecf21cdde271acbd280c53bfe5beaafe2.tar.gz
glibc-541428fecf21cdde271acbd280c53bfe5beaafe2.tar.bz2
Fix ynl return value with LDBL_MIN.
Diffstat (limited to 'sysdeps/ieee754/ldbl-96/e_jnl.c')
-rw-r--r--sysdeps/ieee754/ldbl-96/e_jnl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/ieee754/ldbl-96/e_jnl.c b/sysdeps/ieee754/ldbl-96/e_jnl.c
index 2e206e7..36b0d8b 100644
--- a/sysdeps/ieee754/ldbl-96/e_jnl.c
+++ b/sysdeps/ieee754/ldbl-96/e_jnl.c
@@ -360,7 +360,8 @@ __ieee754_ynl (int n, long double x)
b = __ieee754_y1l (x);
/* quit if b is -inf */
GET_LDOUBLE_WORDS (se, i0, i1, b);
- for (i = 1; i < n && se != 0xffff; i++)
+ /* Use 0xffffffff since GET_LDOUBLE_WORDS sign-extends SE. */
+ for (i = 1; i < n && se != 0xffffffff; i++)
{
temp = b;
b = ((long double) (i + i) / x) * b - a;