diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-30 19:40:35 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-30 19:40:35 +0200 |
commit | 1631ebd26712b2f5f41285c8cada819bebed294c (patch) | |
tree | cc14510e63524957e0b8e5d0ace59aea2ea34855 /test/math/libm-test.inc | |
parent | 69c3616ade8e268708ef24e5b091f94f2ffe08d4 (diff) |
test/math/*: unbreak
test/math was not running at all, presume it has bit rotted:
It was trying to run libm-test.c as if it is a binary.
It was looking for libm-test-ulps (file with allowed
errors in lower bits) in arch-specific dirs which do not exist
in uclibc, as a result wrong file (libm-test.inc) was used instead.
Test failure was not showing the error result, user had to
fish it out from some .out files.
I added libm-test-ulps-ARCH files from recent glibc,
this filtered out a lot of false positives.
For example, cosf(M_PI_6l * 4.0) ideally should be -0.5,
we are getting -0.50000005047356477217, and this isn't
a failure (the difference is one lowest bit of mantissa).
"make check UCLIBC_ONLY=1 VERBOSE=1" still fails,
but not as catastrophically as before.
For the record, the failure occurs on the stage where we check
32-bit float functions, these tests fail:
Failure: Test: modf (NaN, &x) == NaN
Failure: Test: ilogb (NaN) == FP_ILOGBNAN plus exceptions allowed
Failure: Test: scalb (2.0, 0.5) == NaN plus invalid exception
Failure: Test: scalb (3.0, -2.5) == NaN plus invalid exception
Failure: Test: scalb (0, NaN) == NaN
Failure: Test: scalb (1, NaN) == NaN
Failure: Test: scalb (0, inf) == NaN plus invalid exception
Failure: Test: scalb (-0, inf) == NaN plus invalid exception
Failure: Test: scalb (1, inf) == inf
Failure: Test: scalb (-1, inf) == -inf
Failure: Test: scalb (inf, -inf) == NaN plus invalid exception
Failure: Test: scalb (-inf, -inf) == NaN plus invalid exception
Failure: Test: scalb (1, NaN) == NaN
Failure: Test: scalb (0, NaN) == NaN
Failure: Test: scalb (inf, NaN) == NaN
Failure: Test: pow (1, NaN) == 1
Failure: Test: pow (1, inf) == 1
Failure: Test: pow (-1, inf) == 1
Failure: Test: pow (1, -inf) == 1
Failure: Test: pow (-1, -inf) == 1
Failure: Test: rint (0.5) == 0.0
Failure: Test: rint (1.5) == 2.0
Failure: Test: rint (2.5) == 2.0
Failure: Test: rint (3.5) == 4.0
Failure: Test: rint (4.5) == 4.0
Failure: Test: rint (-0.5) == -0.0
Failure: Test: rint (-1.5) == -2.0
Failure: Test: rint (-2.5) == -2.0
Failure: Test: rint (-3.5) == -4.0
Failure: Test: rint (-4.5) == -4.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'test/math/libm-test.inc')
-rw-r--r-- | test/math/libm-test.inc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/math/libm-test.inc b/test/math/libm-test.inc index 4570bcc09..239675e2e 100644 --- a/test/math/libm-test.inc +++ b/test/math/libm-test.inc @@ -26,17 +26,17 @@ FUNC(function): converts general function name (like cos) to name with correct suffix (e.g. cosl or cosf) MATHCONST(x): like FUNC but for constants (e.g convert 0.0 to 0.0L) - FLOAT: floating point type to test - - TEST_MSG: informal message to be displayed + FLOAT: floating point type to test + - TEST_MSG: informal message to be displayed CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat): chooses one of the parameters as delta for testing equality - PRINTF_EXPR Floating point conversion specification to print a variable + PRINTF_EXPR Floating point conversion specification to print a variable of type FLOAT with printf. PRINTF_EXPR just contains the specifier, not the percent and width arguments, e.g. "f". PRINTF_XEXPR Like PRINTF_EXPR, but print in hexadecimal format. - PRINTF_NEXPR Like PRINTF_EXPR, but print nice. */ + PRINTF_NEXPR Like PRINTF_EXPR, but print nice. */ /* This testsuite has currently tests for: acos, acosh, asin, asinh, atan, atan2, atanh, @@ -4517,7 +4517,8 @@ tanh_test (void) START (tanh); TEST_f_f (tanh, 0, 0); - TEST_f_f (tanh, minus_zero, minus_zero); + /* vda: uclibc: added IGNORE_ZERO_INF_SIGN to treat -0 as ok */ + TEST_f_f (tanh, minus_zero, minus_zero, IGNORE_ZERO_INF_SIGN); #ifndef TEST_INLINE TEST_f_f (tanh, plus_infty, 1); |