From 8f3edfee157e9369e2207d27901ea84bdec9e587 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 5 Mar 2007 19:38:56 +0000 Subject: [BZ #4096] 2007-03-01 Jakub Jelinek [BZ #4096] * sysdeps/ieee754/dbl-64/e_pow.c (__ieee754_pow): Check for NaN earlier. * math/libm-test.inc (pow_test): Add more tests involving NaNs. * sysdeps/i386/fpu/e_powf.S (__ieee754_powf): Avoid invalid exception for x qNaN and y either +-inf or non-integer value. * sysdeps/i386/fpu/e_pow.S (__ieee754_pow): Likewise. * sysdeps/i386/fpu/e_powl.S (__ieee754_powl): Likewise. * sysdeps/x86_64/fpu/e_powl.S (__ieee754_powl): Likewise. --- math/libm-test.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'math') diff --git a/math/libm-test.inc b/math/libm-test.inc index 23ee6be..972309f 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -4614,6 +4614,17 @@ pow_test (void) /* pow (x, NaN) == NaN. */ TEST_ff_f (pow, 3.0, nan_value, nan_value); + TEST_ff_f (pow, minus_zero, nan_value, nan_value); + TEST_ff_f (pow, plus_infty, nan_value, nan_value); + TEST_ff_f (pow, -3.0, nan_value, nan_value); + TEST_ff_f (pow, minus_infty, nan_value, nan_value); + + TEST_ff_f (pow, nan_value, 3.0, nan_value); + TEST_ff_f (pow, nan_value, -3.0, nan_value); + TEST_ff_f (pow, nan_value, plus_infty, nan_value); + TEST_ff_f (pow, nan_value, minus_infty, nan_value); + TEST_ff_f (pow, nan_value, 2.5, nan_value); + TEST_ff_f (pow, nan_value, -2.5, nan_value); TEST_ff_f (pow, 1, plus_infty, 1); TEST_ff_f (pow, -1, plus_infty, 1); -- cgit v1.1