aboutsummaryrefslogtreecommitdiff
path: root/math/libm-test.inc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-03-15 20:10:51 +0000
committerUlrich Drepper <drepper@redhat.com>2007-03-15 20:10:51 +0000
commit6b2665f534dd34c20f31dc6e3540114762a8d3a8 (patch)
treee32593b105af2dea5c2397b7527f0e0348656b95 /math/libm-test.inc
parent44969f17bb8e323ab66799f73a05d23a5a2cf83a (diff)
downloadglibc-6b2665f534dd34c20f31dc6e3540114762a8d3a8.tar
glibc-6b2665f534dd34c20f31dc6e3540114762a8d3a8.tar.gz
glibc-6b2665f534dd34c20f31dc6e3540114762a8d3a8.tar.bz2
glibc-6b2665f534dd34c20f31dc6e3540114762a8d3a8.zip
[BZ #3919]
* math/libm-test.inc (log_test): Test -Inf and NaN. (log10_test, log1p_test, log2_test): Test -Inf. * sysdeps/i386/fpu/e_log.S (__ieee754_log): Don't raise FE_INVALID when argument is qNaN. * sysdeps/i386/fpu/e_logl.S (__ieee754_logl): Likewise. * sysdeps/i386/fpu/e_logf.S (__ieee754_logf): Likewise. * sysdeps/x86_64/fpu/e_logl.S (__ieee754_logl): Likewise. * sysdeps/x86_64/fpu/e_log10l.S (__ieee754_log10l): Replace andb $1, %ah with testb $1, %ah, don't test for parity, instead testb $4, %ah and jump if non-zero. * sysdeps/x86_64/fpu/e_log2l.S (__ieee754_log2l): Likewise. * sysdeps/x86_64/fpu/s_log1pl.S (__log1pl): Likewise. 2007-03-15 Jakub Jelinek <jakub@redhat.com>
Diffstat (limited to 'math/libm-test.inc')
-rw-r--r--math/libm-test.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 972309f85f..81dd364f77 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -4127,7 +4127,9 @@ log_test (void)
TEST_f_f (log, 1, 0);
TEST_f_f (log, -1, nan_value, INVALID_EXCEPTION);
+ TEST_f_f (log, minus_infty, nan_value, INVALID_EXCEPTION);
TEST_f_f (log, plus_infty, plus_infty);
+ TEST_f_f (log, nan_value, nan_value);
TEST_f_f (log, M_El, 1);
TEST_f_f (log, 1.0 / M_El, -1);
@@ -4157,6 +4159,7 @@ log10_test (void)
/* log10 (x) == NaN plus invalid exception if x < 0. */
TEST_f_f (log10, -1, nan_value, INVALID_EXCEPTION);
+ TEST_f_f (log10, minus_infty, nan_value, INVALID_EXCEPTION);
TEST_f_f (log10, plus_infty, plus_infty);
TEST_f_f (log10, nan_value, nan_value);
@@ -4188,6 +4191,7 @@ log1p_test (void)
TEST_f_f (log1p, -1, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
TEST_f_f (log1p, -2, nan_value, INVALID_EXCEPTION);
+ TEST_f_f (log1p, minus_infty, nan_value, INVALID_EXCEPTION);
TEST_f_f (log1p, plus_infty, plus_infty);
TEST_f_f (log1p, nan_value, nan_value);
@@ -4218,6 +4222,7 @@ log2_test (void)
TEST_f_f (log2, 1, 0);
TEST_f_f (log2, -1, nan_value, INVALID_EXCEPTION);
+ TEST_f_f (log2, minus_infty, nan_value, INVALID_EXCEPTION);
TEST_f_f (log2, plus_infty, plus_infty);
TEST_f_f (log2, nan_value, nan_value);