1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Add more tests of pow.

Prompted by a gcc-patches discussion, this patch adds tests of pow for
the cases where pow (x, 0.5) is required to return a different result
from sqrt (x), as those cases were previously missing from the tests
(although they worked correctly).

Tested for x86_64 and x86.

	* math/auto-libm-test-in: Add another test of pow.
	* math/auto-libm-test-out: Regenerated.
	* math/libm-test.inc (pow_test_data): Add another test.
This commit is contained in:
Joseph Myers
2015-11-10 17:34:13 +00:00
parent 71bbdde7f5
commit 685312298f
4 changed files with 33 additions and 0 deletions

View File

@ -10285,6 +10285,7 @@ static const struct test_ff_f_data pow_test_data[] =
#endif
/* pow (-inf, y) == +inf for y > 0 and not an odd integer. */
TEST_ff_f (pow, minus_infty, 0.5, plus_infty, ERRNO_UNCHANGED),
TEST_ff_f (pow, minus_infty, 28, plus_infty, ERRNO_UNCHANGED),
TEST_ff_f (pow, minus_infty, 0x1p24, plus_infty, ERRNO_UNCHANGED),
TEST_ff_f (pow, minus_infty, 0x1p127, plus_infty, ERRNO_UNCHANGED),