Commit Graph

714 Commits

Author SHA1 Message Date
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
Thomas Schwinge f1cc4c8654 math: Additional type conversion tests
These have helped me find and fix type conversion issues in QEMU's MIPS
hardware emulation.  While certainly glibc is not the best place for such
tests, they're just an enhancement of tests already present.
2013-08-29 12:21:07 +02:00
Joseph Myers 8fe89494e6 Fix cexp (NaN + i0) (bug 15532). 2013-08-23 19:45:38 +00:00
Joseph Myers acd06bb11f Fix fdim handling of infinities (bug 15797). 2013-08-21 19:56:48 +00:00
Joseph Myers c980f2f4fe Fix cproj handling of (finite, NaN) arguments (bug 15531). 2013-08-20 19:41:15 +00:00
Andreas Schwab ca0a6bc4c5 Fix cbrtl for ldbl-96 2013-08-13 09:45:02 +02:00
David S. Miller f959cfd790 Annotate more cases of math bug 15319.
* math/libm-test.inc (casin_test_data): Annotate more cases of missing
	underflows from atanl/atan2l due to bug 15319.
	(casinh_test_data): Likewise.
2013-07-13 16:57:05 -07:00
Joseph Myers b8c792af85 Allow fesetround failures in math/test-misc.c if ROUNDING_TESTS fails. 2013-06-20 19:11:34 +00:00
Joseph Myers c91e082525 Avoid spurious failures from <fenv.h> fallback functions (bug 15654). 2013-06-20 19:10:44 +00:00
Joseph Myers 1a8463176c Use math-tests.h more in math/test-misc. 2013-06-17 11:48:11 +00:00
Joseph Myers 8fc75e6fb7 Add another fma test. 2013-06-15 19:58:38 +00:00
Joseph Myers 94f2c07669 Make more libm tests condition exceptions tests with math-tests.h. 2013-06-12 12:41:25 +00:00
Joseph Myers f1d73d30df Add exception information to math-tests.h and use it in libm-test.inc. 2013-06-11 15:44:31 +00:00
Joseph Myers 0efa6f8b99 Add rounding mode information to math-tests.h and use it in libm-test.inc. 2013-06-10 12:34:49 +00:00
Joseph Myers 9c84384cc1 Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
Carlos O'Donell 8b0ccb2d7f BZ #15536: Fix ulp for 128-bit IBM long double.
In 128-bit IBM long double the precision of the type
decreases as you approach subnormal numbers, equaling
that of a double for subnormal numbers. Therefore
adjust the computation in ulp to use 2^(MIN_EXP - MANT_DIG)
which is correct for FP_SUBNORMAL for all types.
2013-06-03 14:49:48 -04:00
Joseph Myers fab7ce3f5b Link extra-libs consistently with libc and ld.so. 2013-05-31 16:16:33 +00:00
Joseph Myers 0323d08657 Fix ldbl-96 hypotl of subnormals (bug 15529). 2013-05-24 20:52:55 +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
Carlos O'Donell e96e37676f Correctly compute ulp near zero.
The current value used for ulp near zero is wrong,
and this commit fixes it such that ulp(0) is the smallest
subnormal value nearest to zero, which makes the most
sense for testing values near zero. Note that this is not
what Java does; they use the nearest normal value, which
is less accurate than what we want for glibc. Note that
there is no correct implementation of ulp since there
is no strict mathmatical definition that is accepted by
all groups using IEEE 754.

Previously with the large ulp values near zero there
were tests that previously passed, but were in fact
billions of ulp away from the precise answer. With this
commit we now need to disable one of the cpow tests which
is revealed to be inaccurate (bug 14473).

---

2013-05-24  Carlos O'Donell  <carlos@redhat.com>

	* math/libm-test.inc (MAX_EXP): Define.
	(ULPDIFF): Define.
	(ulp): New function.
	(check_float_internal): Use ULPDIFF.
	(cpow_test): Disable failing test.
	(check_ulp): Test ulp() implemetnation.
	(main): Call check_ulp before starting tests.
2013-05-24 14:23:15 -04:00
Joseph Myers e8bdba36c5 Remove libm-test START_DATA and END_DATA. 2013-05-24 13:10:42 +00:00
Joseph Myers b679a606ca Make libm-test START and END into ordinary macros. 2013-05-24 12:22:04 +00:00
Joseph Myers 351fe55087 Don't include function names in test data in generated libm-test.c. 2013-05-22 21:01:44 +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 f16cc3eb81 Simplify gen-libm-test.pl handling of tests with extra outputs. 2013-05-19 14:40:40 +00:00
Joseph Myers 2ee094ff75 Don't disable CMPLXL macro for __NO_LONG_DOUBLE_MATH (bug 15488). 2013-05-18 12:12:38 +00:00
Joseph Myers 3779b5b64a Make libm-test look up ulps by name at runtime. 2013-05-18 12:10:59 +00:00
Joseph Myers bb38759d6d Fix remainder exceptions and directed-rounding results (bugs 15480, 15485). 2013-05-17 19:04:08 +00:00
Joseph Myers a00bdcf0e0 Simplify libm-test extra-output initialization. 2013-05-17 19:02:19 +00:00
Joseph Myers de407f79a2 Don't handle ulps for integer tests in libm-test.inc. 2013-05-17 19:01:27 +00:00
Joseph Myers 8269107fe6 Test more cases of "inexact" exceptions in libm-test.inc. 2013-05-17 14:45:50 +00:00
Joseph Myers c58b274f01 Test for errno setting in more pole error cases. 2013-05-16 21:57:25 +00:00
Joseph Myers 0ab349044b Remove ENOSYS tests in libm-test.inc. 2013-05-16 19:09:54 +00:00
Joseph Myers 323e5cb792 Remove libm-test support for TEST_* inside functions. 2013-05-16 19:09:03 +00:00
Joseph Myers 8c75f67421 Convert TEST_extra tests from code to data. 2013-05-16 15:53:40 +00:00
Richard Henderson e6e49e59c1 De-stringify constants in math/atest-exp2.c. 2013-05-16 06:34:01 -07:00
Joseph Myers 105a07dfc0 Support testing "inexact" exceptions in libm-test.inc. 2013-05-16 13:19:38 +00:00
Joseph Myers e9eee333b9 Test for errno setting in more overflow error cases. 2013-05-16 13:18:48 +00:00
Joseph Myers 1c38ff73fd Convert TEST_cc_c tests from code to data. 2013-05-16 13:17:55 +00:00
Joseph Myers 15c7c18dc6 Convert TEST_f_L tests from code to data. 2013-05-16 13:16:56 +00:00
Peter Collingbourne f137ff1383 Remove const attribute on get_log2
This function is not const, as it can modify log2_m and log2_m_inited.
2013-05-15 14:27:53 -07:00
Joseph Myers 3608cb241e Convert TEST_f_l tests from code to data. 2013-05-15 19:48:17 +00:00
Joseph Myers b861c6c4c9 Consistently use TEST_f_L in tests of llrint and llround. 2013-05-15 16:58:41 +00:00
Joseph Myers 7abeee129e Convert TEST_f_b tests from code to data. 2013-05-15 12:04:07 +00:00
Joseph Myers cbe8c4d333 Test for errno setting in more domain error cases. 2013-05-15 10:43:19 +00:00
Joseph Myers 5575c0e5cd Disable libm-test errno testing for TEST_INLINE. 2013-05-15 10:42:18 +00:00
Joseph Myers d369f53178 Convert TEST_ff_i tests from code to data. 2013-05-15 10:41:39 +00:00