Commit Graph

700 Commits

Author SHA1 Message Date
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
Joseph Myers
5e90827081 Fix whitespace in RUN_TEST_LOOP_2_f. 2013-05-14 21:17:19 +00:00
Joseph Myers
f71172e551 Correct types of fields in libm-test.inc structures. 2013-05-14 21:00:56 +00:00
Joseph Myers
8cfa635ab8 Convert TEST_ffI_f1 tests from code to data. 2013-05-14 20:36:03 +00:00
Joseph Myers
acbd839a07 Convert TEST_f_i tests from code to data. 2013-05-14 19:13:43 +00:00
Joseph Myers
e414d745ee Fix function name in scalbln_test call to END. 2013-05-14 19:12:54 +00:00
Joseph Myers
d9c2a0fd2c Convert TEST_fI_f1 tests from code to data. 2013-05-14 19:12:10 +00:00
Joseph Myers
9dc9095d56 Convert TEST_fF_f1 tests from code to data. 2013-05-14 14:49:26 +00:00
Joseph Myers
87aa21df6f Convert TEST_f_f1 tests from code to data. 2013-05-14 12:01:19 +00:00
Joseph Myers
68fc074ca0 Convert TEST_fl_f tests from code to data. 2013-05-13 22:38:15 +00:00
Joseph Myers
243216e126 Convert TEST_fi_f tests from code to data. 2013-05-13 19:45:36 +00:00
Joseph Myers
6a1992e268 Convert TEST_c_f tests from code to data. 2013-05-13 18:58:17 +00:00
Joseph Myers
0e400df55d Convert TEST_if_f tests from code to data. 2013-05-13 18:57:35 +00:00
Joseph Myers
6d33265c72 Consistently use TEST_fl_f in tests of scalbln. 2013-05-13 18:56:50 +00:00
Adhemerval Zanella
f98ece5fe2 Define decimal constant M_1_DIV_El in libm-test.inc
This patch replaces the 1.0 / M_El by the decimal constant M_1_DIV_El.
2013-05-13 12:08:42 -05:00