about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/e_j1.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-03-14 17:47:30 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-03-14 17:47:30 +0000
commit41c7328e851ffc090dbbc4db707c0e8dfa0ae870 (patch)
tree7fc0e767c62b7135174b9d52962814d029acb85e /sysdeps/ieee754/dbl-64/e_j1.c
parentcbc105f8b590fa5f5343160ef0a33dde6366c427 (diff)
downloadglibc-41c7328e851ffc090dbbc4db707c0e8dfa0ae870.tar.gz
glibc-41c7328e851ffc090dbbc4db707c0e8dfa0ae870.tar.xz
glibc-41c7328e851ffc090dbbc4db707c0e8dfa0ae870.zip
Fix spurious underflow exceptions for Bessel functions for double (bug 14155).
Diffstat (limited to 'sysdeps/ieee754/dbl-64/e_j1.c')
-rw-r--r--sysdeps/ieee754/dbl-64/e_j1.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_j1.c b/sysdeps/ieee754/dbl-64/e_j1.c
index cba4d46b18..cca5f20b4f 100644
--- a/sysdeps/ieee754/dbl-64/e_j1.c
+++ b/sysdeps/ieee754/dbl-64/e_j1.c
@@ -291,7 +291,8 @@ pone(double x)
 	int32_t ix;
 	GET_HIGH_WORD(ix,x);
 	ix &= 0x7fffffff;
-	if(ix>=0x40200000)     {p = pr8; q= ps8;}
+	if (ix>=0x41b00000)    {return one;}
+	else if(ix>=0x40200000){p = pr8; q= ps8;}
 	else if(ix>=0x40122E8B){p = pr5; q= ps5;}
 	else if(ix>=0x4006DB6D){p = pr3; q= ps3;}
 	else if(ix>=0x40000000){p = pr2; q= ps2;}
@@ -399,7 +400,8 @@ qone(double x)
 	int32_t ix;
 	GET_HIGH_WORD(ix,x);
 	ix &= 0x7fffffff;
-	if(ix>=0x40200000)     {p = qr8; q= qs8;}
+	if (ix>=0x41b00000)    {return .375/x;}
+	else if(ix>=0x40200000){p = qr8; q= qs8;}
 	else if(ix>=0x40122E8B){p = qr5; q= qs5;}
 	else if(ix>=0x4006DB6D){p = qr3; q= qs3;}
 	else if(ix>=0x40000000){p = qr2; q= qs2;}