1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-11-27 12:01:15 +03:00

Fix i386/x86_64 logl (sNaN) (bug 20227).

The i386/x86_64 versions of logl return sNaN for sNaN input.  This
patch fixes them to add a NaN input to itself so that qNaN is returned
in this case.

Tested for x86_64 and x86 (including a build for i586 to cover the
non-i686 logl version).

	[BZ #20227]
	* sysdeps/i386/fpu/e_logl.S (__ieee754_logl): Add NaN input to
	itself.
	* sysdeps/i386/i686/fpu/e_logl.S (__ieee754_logl): Likewise.
	* sysdeps/x86_64/fpu/e_logl.S (__ieee754_logl): Likewise.
	* math/libm-test.inc (log_test_data): Add sNaN tests.
This commit is contained in:
Joseph Myers
2016-06-08 22:24:06 +00:00
parent 9bd3ef8e19
commit df179d8808
5 changed files with 12 additions and 0 deletions

View File

@@ -8998,6 +8998,8 @@ static const struct test_f_f_data log_test_data[] =
TEST_f_f (log, plus_infty, plus_infty, ERRNO_UNCHANGED),
TEST_f_f (log, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
TEST_f_f (log, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
TEST_f_f (log, snan_value, qnan_value, INVALID_EXCEPTION),
TEST_f_f (log, -snan_value, qnan_value, INVALID_EXCEPTION),
AUTO_TESTS_f_f (log),
};