about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/e_j0.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_j0.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_j0.c')
-rw-r--r--sysdeps/ieee754/dbl-64/e_j0.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_j0.c b/sysdeps/ieee754/dbl-64/e_j0.c
index f393a762b2..d641a09149 100644
--- a/sysdeps/ieee754/dbl-64/e_j0.c
+++ b/sysdeps/ieee754/dbl-64/e_j0.c
@@ -293,7 +293,8 @@ pzero(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;}
@@ -400,7 +401,8 @@ qzero(double x)
 	int32_t ix;
 	GET_HIGH_WORD(ix,x);
 	ix &= 0x7fffffff;
-	if(ix>=0x40200000)     {p = qR8; q= qS8;}
+	if (ix>=0x41b00000)    {return -.125/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;}