diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-03-14 17:47:30 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-03-14 17:47:30 +0000 |
commit | 41c7328e851ffc090dbbc4db707c0e8dfa0ae870 (patch) | |
tree | 7fc0e767c62b7135174b9d52962814d029acb85e /sysdeps/ieee754/dbl-64 | |
parent | cbc105f8b590fa5f5343160ef0a33dde6366c427 (diff) | |
download | glibc-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')
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_j0.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_j1.c | 6 |
2 files changed, 8 insertions, 4 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;} 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;} |