mirror of
https://sourceware.org/git/glibc.git
synced 2025-11-27 12:01:15 +03:00
Fix dbl-64 asin (sNaN) (bug 20213).
The dbl-64 version of asin returns sNaN for sNaN arguments. This patch fixes it to add NaN arguments to themselves so that qNaN is returned in this case. Tested for x86_64 and x86. [BZ #20213] * sysdeps/ieee754/dbl-64/e_asin.c (__ieee754_asin): Add NaN argument to itself. * math/libm-test.inc (asin_test_data): Add sNaN tests.
This commit is contained in:
@@ -1853,6 +1853,8 @@ static const struct test_f_f_data asin_test_data[] =
|
||||
TEST_f_f (asin, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
|
||||
TEST_f_f (asin, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
|
||||
TEST_f_f (asin, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
|
||||
TEST_f_f (asin, snan_value, qnan_value, INVALID_EXCEPTION),
|
||||
TEST_f_f (asin, -snan_value, qnan_value, INVALID_EXCEPTION),
|
||||
|
||||
/* asin x == qNaN plus invalid exception for |x| > 1. */
|
||||
TEST_f_f (asin, 1.125L, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
|
||||
|
||||
Reference in New Issue
Block a user