diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-03-16 20:08:02 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-03-16 20:08:02 +0000 |
commit | c36e1d2369f149a64c759f3ad6f4cc5a03b03b62 (patch) | |
tree | e08402c0a348536aedf71d15bc7c4de01089066c /math | |
parent | 11b90b9f504df5b2da91ce3a06c1657d99e4a95f (diff) | |
download | glibc-c36e1d2369f149a64c759f3ad6f4cc5a03b03b62.tar.gz |
Disable Bessel function TLOSS errors in POSIX mode.
Diffstat (limited to 'math')
-rw-r--r-- | math/libm-test.inc | 28 | ||||
-rw-r--r-- | math/w_j0.c | 4 | ||||
-rw-r--r-- | math/w_j0f.c | 4 | ||||
-rw-r--r-- | math/w_j0l.c | 4 | ||||
-rw-r--r-- | math/w_j1.c | 4 | ||||
-rw-r--r-- | math/w_j1f.c | 4 | ||||
-rw-r--r-- | math/w_j1l.c | 4 | ||||
-rw-r--r-- | math/w_jn.c | 4 | ||||
-rw-r--r-- | math/w_jnf.c | 4 | ||||
-rw-r--r-- | math/w_jnl.c | 7 |
10 files changed, 48 insertions, 19 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc index 8bcaa8869f..5638b76869 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -3686,6 +3686,12 @@ j0_test (void) TEST_f_f (j0, 4.0, -3.9714980986384737228659076845169804197562E-1L); TEST_f_f (j0, -4.0, -3.9714980986384737228659076845169804197562E-1L); + TEST_f_f (j0, 0x1.d7ce3ap+107L, 2.775523647291230802651040996274861694514e-17L); + +#ifndef TEST_FLOAT + TEST_f_f (j0, -0x1.001000001p+593L, -3.927269966354206207832593635798954916263e-90L); +#endif + END (j0); } @@ -3721,6 +3727,12 @@ j1_test (void) TEST_f_f (j1, 8.0, 0.234636346853914624381276651590454612L); TEST_f_f (j1, 10.0, 0.0434727461688614366697487680258592883L); + TEST_f_f (j1, 0x1.3ffp+74L, 1.818984347516051243459364437186082741567e-12L); + +#ifndef TEST_FLOAT + TEST_f_f (j1, 0x1.ff00000000002p+840L, 1.846591691699331493194965158699937660696e-127L); +#endif + END (j1); } @@ -3801,7 +3813,9 @@ jn_test (void) TEST_ff_f (jn, 6, 2.4048255576957729L, 0.34048184720278336646673682895929161E-2L); TEST_ff_f (jn, 7, 2.4048255576957729L, 0.60068836573295394221291569249883076E-3L); TEST_ff_f (jn, 8, 2.4048255576957729L, 0.92165786705344923232879022467054148E-4L); - TEST_ff_f (jn, 9, 2.4048255576957729L, 0.12517270977961513005428966643852564E-4L) + TEST_ff_f (jn, 9, 2.4048255576957729L, 0.12517270977961513005428966643852564E-4L); + + TEST_ff_f (jn, 2, 0x1.ffff62p+99L, -4.43860668048170034334926693188979974489e-16L); END (jn); } @@ -7152,6 +7166,12 @@ y0_test (void) TEST_f_f (y0, 8.0, 0.223521489387566220527323400498620359L); TEST_f_f (y0, 10.0, 0.0556711672835993914244598774101900481L); + TEST_f_f (y0, 0x1.3ffp+74L, 1.818984347516051243459467456433028748678e-12L); + +#ifndef TEST_FLOAT + TEST_f_f (y0, 0x1.ff00000000002p+840L, 1.846591691699331493194965158699937660696e-127L); +#endif + END (y0); } @@ -7186,6 +7206,12 @@ y1_test (void) TEST_f_f (y1, 8.0, -0.158060461731247494255555266187483550L); TEST_f_f (y1, 10.0, 0.249015424206953883923283474663222803L); + TEST_f_f (y1, 0x1.27e204p+99L, -8.881610148467797208469612080785210013461e-16L); + +#ifndef TEST_FLOAT + TEST_f_f (y1, 0x1.001000001p+593L, 3.927269966354206207832593635798954916263e-90L); +#endif + END (y1); } diff --git a/math/w_j0.c b/math/w_j0.c index f8d3724756..0171a0bc72 100644 --- a/math/w_j0.c +++ b/math/w_j0.c @@ -26,7 +26,7 @@ double j0 (double x) { if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) /* j0(|x|>X_TLOSS) */ return __kernel_standard (x, x, 34); @@ -53,7 +53,7 @@ y0 (double x) else if (x == 0.0) /* d = -one/(x-x) */ return __kernel_standard (x, x, 8); - else + else if (_LIB_VERSION != _POSIX_) /* y0(x>X_TLOSS) */ return __kernel_standard (x, x, 35); } diff --git a/math/w_j0f.c b/math/w_j0f.c index cef36aab1b..9e1681a243 100644 --- a/math/w_j0f.c +++ b/math/w_j0f.c @@ -26,7 +26,7 @@ float j0f (float x) { if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) /* j0(|x|>X_TLOSS) */ return __kernel_standard_f (x, x, 134); @@ -51,7 +51,7 @@ y0f (float x) else if (x == 0.0f) /* d = -one/(x-x) */ return __kernel_standard_f (x, x, 108); - else + else if (_LIB_VERSION != _POSIX_) /* y0(x>X_TLOSS) */ return __kernel_standard_f (x, x, 135); } diff --git a/math/w_j0l.c b/math/w_j0l.c index 144f33c0db..54c9c89029 100644 --- a/math/w_j0l.c +++ b/math/w_j0l.c @@ -26,7 +26,7 @@ long double __j0l (long double x) { if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) /* j0(|x|>X_TLOSS) */ return __kernel_standard (x, x, 234); @@ -51,7 +51,7 @@ __y0l (long double x) else if (x == 0.0L) /* d = -one/(x-x) */ return __kernel_standard (x, x, 208); - else + else if (_LIB_VERSION != _POSIX_) /* y0(x>X_TLOSS) */ return __kernel_standard (x, x, 235); } diff --git a/math/w_j1.c b/math/w_j1.c index e9a5357b76..40600503ee 100644 --- a/math/w_j1.c +++ b/math/w_j1.c @@ -26,7 +26,7 @@ double j1 (double x) { if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) /* j1(|x|>X_TLOSS) */ return __kernel_standard (x, x, 36); @@ -53,7 +53,7 @@ y1 (double x) else if (x == 0.0) /* d = -one/(x-x) */ return __kernel_standard (x, x, 10); - else + else if (_LIB_VERSION != _POSIX_) /* y1(x>X_TLOSS) */ return __kernel_standard (x, x, 37); } diff --git a/math/w_j1f.c b/math/w_j1f.c index 29bd949eea..a3f5ee2e27 100644 --- a/math/w_j1f.c +++ b/math/w_j1f.c @@ -26,7 +26,7 @@ float j1f (float x) { if (__builtin_expect (isgreater (fabsf (x), X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) /* j1(|x|>X_TLOSS) */ return __kernel_standard_f (x, x, 136); @@ -51,7 +51,7 @@ y1f (float x) else if (x == 0.0f) /* d = -one/(x-x) */ return __kernel_standard_f (x, x, 110); - else + else if (_LIB_VERSION != _POSIX_) /* y1(x>X_TLOSS) */ return __kernel_standard_f (x, x, 137); } diff --git a/math/w_j1l.c b/math/w_j1l.c index 01b8551252..208377ecaf 100644 --- a/math/w_j1l.c +++ b/math/w_j1l.c @@ -26,7 +26,7 @@ long double __j1l (long double x) { if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) /* j1(|x|>X_TLOSS) */ return __kernel_standard (x, x, 236); @@ -51,7 +51,7 @@ __y1l (long double x) else if (x == 0.0L) /* d = -one/(x-x) */ return __kernel_standard (x, x, 210); - else + else if (_LIB_VERSION != _POSIX_) /* y1(x>X_TLOSS) */ return __kernel_standard (x, x, 237); } diff --git a/math/w_jn.c b/math/w_jn.c index fd3fb162f2..63658a93c2 100644 --- a/math/w_jn.c +++ b/math/w_jn.c @@ -26,7 +26,7 @@ double jn (int n, double x) { if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) /* jn(n,|x|>X_TLOSS) */ return __kernel_standard (n, x, 38); @@ -53,7 +53,7 @@ yn (int n, double x) else if (x == 0.0) /* d = -one/(x-x) */ return __kernel_standard (n, x, 12); - else + else if (_LIB_VERSION != _POSIX_) /* yn(n,x>X_TLOSS) */ return __kernel_standard (n, x, 39); } diff --git a/math/w_jnf.c b/math/w_jnf.c index 36d6f6d573..41d9bc5711 100644 --- a/math/w_jnf.c +++ b/math/w_jnf.c @@ -26,7 +26,7 @@ float jnf (int n, float x) { if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0) - && _LIB_VERSION != _IEEE_) + && _LIB_VERSION != _IEEE_ && _LIB_VERSION != _POSIX_) /* jn(n,|x|>X_TLOSS) */ return __kernel_standard_f (n, x, 138); @@ -51,7 +51,7 @@ ynf (int n, float x) else if (x == 0.0) /* d = -one/(x-x) */ return __kernel_standard_f (n, x, 112); - else + else if (_LIB_VERSION != _POSIX_) /* yn(n,x>X_TLOSS) */ return __kernel_standard_f (n, x, 139); } diff --git a/math/w_jnl.c b/math/w_jnl.c index 148817ff44..2028d488df 100644 --- a/math/w_jnl.c +++ b/math/w_jnl.c @@ -54,7 +54,10 @@ long double __jnl(int n, long double x) /* wrapper jnl */ #else long double z; z = __ieee754_jnl(n,x); - if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z; + if (_LIB_VERSION == _IEEE_ + || _LIB_VERSION == _POSIX_ + || __isnanl(x)) + return z; if(fabsl(x)>X_TLOSS) { return __kernel_standard((double)n,x,238); /* jn(|x|>X_TLOSS,n) */ } else @@ -79,7 +82,7 @@ long double __ynl(int n, long double x) /* wrapper ynl */ /* d = zero/(x-x); */ return __kernel_standard((double)n,x,213); } - if(x>X_TLOSS) { + if(x>X_TLOSS && _LIB_VERSION != _POSIX_) { return __kernel_standard((double)n,x,239); /* yn(x>X_TLOSS,n) */ } else return z; |