Commit Graph

85 Commits

Author SHA1 Message Date
Joseph Myers
176b0c7913 Move TEST_f_f tests for [a-c]* functions from libm-test.inc to auto-libm-test-in. 2013-11-30 22:04:13 +00:00
Joseph Myers
ffa3cd7f1a Fix lgammaf spurious underflow (bug 15427). 2013-09-03 15:32:54 +00:00
Joseph Myers
b7835e3223 Fix spurious jnf underflows (bug 14155). 2013-09-02 14:51:24 +00:00
Jeroen Albers
72c90ed01f Update x86 and x86_64 ulps on AMD FX-8350 with GCC 4.8.1. 2013-07-05 12:58:20 +00:00
Markus Trippelsdorf
5314ed1afd Update x86_64 ULPs. 2013-07-02 22:01:13 +00:00
Joseph Myers
67338156ea Regenerate x86 and x86_64 ulps. 2013-07-02 20:01:15 +00:00
Joseph Myers
dd4259b9f7 Test drem and pow10 in libm-test.inc. 2013-05-24 20:33:14 +00:00
Joseph Myers
4f8dfe270b Use same tests for isfinite/finite, lgamma/gamma. 2013-05-24 19:21:22 +00:00
Joseph Myers
b50a71810b Don't include expected results in libm-test test names. 2013-05-22 11:49:36 +00:00
Joseph Myers
db62a90753 Handle sincos with generic libm-test logic. 2013-05-19 14:45:41 +00:00
Joseph Myers
d8cd06db62 Improve tgamma accuracy (bugs 2546, 2560, 5159, 15426). 2013-05-08 11:58:18 +00:00
Joseph Myers
10de07f5fd Fix catan, catanh spurious underflows (bug 15423). 2013-05-01 10:07:00 +00:00
Joseph Myers
caf84319c1 Fix catan, catanh inaccuracy from atan2 denominators near 0 (bug 15416). 2013-04-30 11:27:35 +00:00
Joseph Myers
5b4217d71f Fix catan, catanh spurious overflows (bug 15409). 2013-04-27 14:57:41 +00:00
Markus Trippelsdorf
1b8359836d Update x86_64 ULPs
2013-04-26  Markus Trippelsdorf  <markus@trippelsdorf.de>

	* sysdeps/x86_64/fpu/libm-test-ulps: Update.
2013-04-26 09:30:46 +02:00
Joseph Myers
2f38fbfe09 Fix catan, catanh inaccuracy through use of log (bug 15394). 2013-04-24 18:49:13 +00:00
Carlos O'Donell
aba5e333d4 libm-test.inc: Fix tests where cos(PI/2) != 0.
The value of PI is never exactly PI in any floating point representation,
and the value of PI/2 is never PI/2. It is wrong to expect cos(M_PI_2l)
to return 0, instead it will return an answer that is  non-zero because
M_PI_2l doesn't round to exactly PI/2 in the type used.

That is to say that the correct answer is to do the following:
* Take PI or PI/2.
* Round to the floating point representation.
* Take the rounded value and compute an infinite precision cos or sin.
* Use the rounded result of the infinite precision cos or sin as the
  answer to the test.

I used printf to do the type rounding, and Wolfram's Alpha to do the
infinite precision cos calculations.

The following changes bring x86-64 and x86 to 1/2 ulp for two tests.
It shows that the x86 cos implementation is quite good, and that
our test are flawed.

Unfortunately given that the rounding errors are type dependent we
need to fix this for each type. No regressions on x86-64 or x86.

---

2013-04-11  Carlos O'Donell  <carlos@redhat.com>

	* math/libm-test.inc (cos_test): Fix PI/2 test.
	(sincos_test): Likewise.
	* sysdeps/x86_64/fpu/libm-test-ulps: Regenerate.
	* sysdeps/i386/fpu/libm-test-ulps: Regenerate.
2013-04-11 08:52:18 -04:00
Joseph Myers
52ce486045 Fix cacosh inaccuracy and spurious exceptions (bug 15327). 2013-04-02 22:54:00 +00:00
Joseph Myers
ccc8cadf75 Fix casinh inaccuracy for imaginary part < 1.0, real part small (bug 10357). 2013-03-30 13:31:53 +00:00
Joseph Myers
3a7182a14b Fix casinh inaccuracy near i, imaginary part > 1 (bug 15307). 2013-03-27 14:38:44 +00:00
Joseph Myers
0a1b2ae6f6 Fix casinh inaccuracy for argument with imaginary part 1 (bug 15287). 2013-03-21 10:27:10 +00:00
Joseph Myers
d2f9799e7c Fix y1l spurious overflows for ldbl-96 (bug 15283). 2013-03-16 17:51:48 +00:00
Joseph Myers
8cf28c5ebe Fix casinh spurious underflows away from [-i,i] (bug 15062). 2013-01-31 22:55:29 +00:00
Joseph Myers
728d7b43fc Fix cacos real-part inaccuracy for result real part near 0 (bug 15023). 2013-01-17 20:25:51 +00:00
Joseph Myers
a9708fed77 Fix casinh, casin overflow (bug 14996). 2013-01-07 14:59:53 +00:00
Joseph Myers
cdc1c96fba Fix casinh, casin inaccuracy from cancellation (bug 14994). 2013-01-04 13:25:17 +00:00
Joseph Myers
1bead169c3 Fix powl inaccuracy for x86_64 and x86 (bug 13881). 2012-11-28 13:40:54 +00:00
David S. Miller
6d33cc9d9b Fix spurious underflows in ldbl-128 atan implementation.
With help from Joseph Myers.
	* sysdeps/ieee754/ldbl-128/s_atanl.c (__atanl): Handle tiny and
	very large arguments properly.
	* math/libm-test.inc (atan_test): New tests.
	(atan2_test): New tests.
	* sysdeps/sparc/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Update.
2012-11-19 15:31:24 -08:00
David S. Miller
05b227bdae Correct tinyness handling in long-double and float y0/y1.
With help from Joseph Myers.
	* sysdeps/ieee754/flt-32/e_j0f.c (__ieee754_y0f): Adjust tinyness
	cutoff to 2**-13.
	* sysdeps/ieee754/flt-32/e_j1f.c (__ieee754_y1f): Adjust tinyness
	cutoff to 2**-25.
	* sysdeps/ieee754/ldbl-128/e_j0l.c (U0): New constant.
	( __ieee754_y0l): Avoid arithmetic underflow when 'x' is very
	small.
	* sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_y1l): Likewise.
	* math/libm-test.inc (y0_test): New tests.
	(y1_test): New tests.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Update.
	* sysdeps/sparc/fpu/libm-test-ulps: Update.
2012-11-18 12:33:53 -08:00
Markus Trippelsdorf
43c4edba7e Update x86-64 ULPs 2012-09-26 12:46:51 +02:00
Joseph Myers
d032e0d29b Fix inaccuracy of clog, clog10 near |z| = 1 (bug 13629). 2012-09-25 19:43:49 +00:00
Liubov Dmitrieva
22bf5c1793 Add optimized sincosf for SSE2 for x86 and x86-64 2012-09-25 20:47:20 +02:00
Andreas Jaeger
bcd6c8dc64 Update libm-test-ulps 2012-09-03 15:43:56 +02:00
Liubov Dmitrieva
4ffffbd272 Add optimized sinf and cosf routines for x86 and x86-64
* sysdeps/i386/i686/fpu/multiarch/Makefile (sysdep_routines):
	Add s_sinf-sse2, s_conf-sse2.

	* sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S: New file.
	* sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S: New file.
	* sysdeps/i386/i686/fpu/multiarch/s_sinf.c: New file.
	* sysdeps/i386/i686/fpu/multiarch/s_cosf.c: New file.

	* sysdeps/ieee754/flt-32/s_sinf.c (SINF, SINF_FUNC): Add macros
	for using routine as __sinf_ia32.
	Use macro for function declaration and weak_alias.
	* sysdeps/ieee754/flt-32/s_cosf.c (COSF, COSF_FUNC): Add macros
	for using routine as __cosf_ia32.
	Use macro for function declaration and weak_alias.

	* sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S: Fix Copyright.
	* sysdeps/i386/i686/fpu/multiarch/e_expf.c: Fix Copyright.

	* sysdeps/x86_64/fpu/s_sinf.S: New file.
	* sysdeps/x86_64/fpu/s_cosf.S: New file.
	* sysdeps/x86_64/fpu/libm-test-ulps: Update.

	* math/libm-test.inc (cos_test): Add more test cases.
	(sin_test): Likewise.
	(sincos_test): Likewise.
2012-09-03 15:32:13 +02:00
Markus Trippelsdorf
ba6cba9eec Update x86-64 ULPs
The recent clog and clog10 fixes are causing some failing tests on my
AMD64 CPU.
2012-08-13 21:25:17 +02:00
Joseph Myers
d0419dbfbd Improve clog, clog10 handling of values with real or imaginary part slightly above 1 (bug 13629). 2012-07-31 14:21:19 +00:00
Joseph Myers
da865e95bc Improve clog, clog10 handling of values with real or imaginary part 1 (bug 13629). 2012-07-26 11:31:35 +00:00
Joseph Myers
638a572eb0 Fix clog, clog10 spurious underflow exceptions (bug 14337). 2012-07-09 11:06:34 +00:00
Joseph Myers
f17ac40d7c Fix expm1 spurious underflow exceptions (bug 6778). 2012-07-06 11:17:41 +00:00
Joseph Myers
cdfe2c5eb3 Fix csqrt underflow (bugs 14157, 14331). 2012-07-05 11:02:13 +00:00
Joseph Myers
ca61cf32d9 Fix ctan, ctanh of subnormals in round-upwards mode (bug 14328). 2012-07-04 09:55:26 +00:00
Joseph Myers
795405f956 Don't include exceptions in libm-test-ulps test names. 2012-05-24 12:14:03 +00:00
Joseph Myers
80bad0ccae Test underflow exceptions in libm-test.inc. 2012-05-24 11:26:36 +00:00
Joseph Myers
e0b16cc25c Fix ccos, csin, ccosh, csinh overflows (bug 14123). 2012-05-19 15:35:29 +00:00
Joseph Myers
495fd99f3a Fix x86/x86_64 expm1l inaccuracy and exceptions (bugs 13885, 13923). 2012-05-07 19:13:08 +00:00
Joseph Myers
d8b82cad1b Fix exp10 inaccuracy and exceptions (bugs 13884, 13914). 2012-05-06 18:23:44 +00:00
Andreas Jaeger
d7cf87a64e Update x86-64 libm-test-ulps 2012-05-06 09:32:12 +02:00
Joseph Myers
adfbc8ac9e Fix x86 acos near 1 (bug 13942). 2012-04-30 18:56:39 +00:00
Joseph Myers
5ba3cc691c Fix acos (-1) in round-downwards mode on x86 (bug 14034). 2012-04-30 09:38:06 +00:00
Markus Trippelsdorf
8280f22d30 Update sysdeps/x86_64/fpu/libm-test-ulps
[BZ #13927]
	* sysdeps/x86_64/fpu/libm-test-ulps: Update.
2012-04-21 14:14:27 +02:00