This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
libm-test.inc patch
- To: libc-alpha at sources dot redhat dot com
- Subject: libm-test.inc patch
- From: Andreas Jaeger <aj at suse dot de>
- Date: 07 May 2001 23:29:08 +0200
I've committed the appended patch for glibc's testsuite.
The exp changes revealed these ULPs for i386 that I just ignore for
now:
testing long double (without inline functions)
Failure: Test: exp (50.0) == 5184705528587072464087.45332293348538
Result:
is: 5.18470552858707247206e+21 0x8.c881f20405a2b4200000p+69
should be: 5.18470552858707246387e+21 0x8.c881f20405a2b3200000p+69
difference: 8.19200000000000000000e+03 0x8.00000000000000000000p+10
ulp : 16.0000
max.ulp : 0.0000
Failure: Test: exp (1000.0) == 0.197007111401704699388887935224332313e435
Result:
is: 1.97007111401704709335e+434 0xc.f391bcd76b9d9b200000p+1439
should be: 1.97007111401704699387e+434 0xc.f391bcd76b9d6c000000p+1439
difference: 9.94799060625058297656e+417 0xb.c8000000000000000000p+1385
ulp : 754.0000
max.ulp : 0.0000
Maximal error of `exp'
is : 754.0000 ulp
accepted: 412.0000 ulp
Andreas
2001-05-07 Andreas Jaeger <aj@suse.de>
* sysdeps/i386/fpu/libm-test-ulps: Add ulps for new exp tests.
* math/libm-test.inc (exp_test): Add some more tests.
(pow_test): Run double only test also for long double.
* math/test-ldouble.c (TEST_LDOUBLE): Define.
* math/test-ildoubl.c (TEST_LDOUBLE): Likewise.
============================================================
Index: sysdeps/i386/fpu/libm-test-ulps
--- sysdeps/i386/fpu/libm-test-ulps 2001/04/17 19:03:52 1.26
+++ sysdeps/i386/fpu/libm-test-ulps 2001/05/07 21:27:47
@@ -561,6 +561,12 @@
Test "exp (0.7) == 2.0137527074704765216":
ildouble: 412
ldouble: 412
+Test "exp (50.0) == 5184705528587072464087.45332293348538":
+ildouble: 16
+ldouble: 16
+Test "exp (1000.0) == 0.197007111401704699388887935224332313e435":
+ildouble: 754
+ldouble: 754
# exp10
Test "exp10 (-1) == 0.1":
@@ -1445,8 +1451,8 @@
ildouble: 36
Function: "exp":
-ildouble: 412
-ldouble: 412
+ildouble: 754
+ldouble: 754
Function: "exp10":
double: 1
============================================================
Index: math/libm-test.inc
--- math/libm-test.inc 2001/04/17 21:29:57 1.31
+++ math/libm-test.inc 2001/05/07 21:28:04
@@ -2372,7 +2372,11 @@
TEST_f_f (exp, 2, M_E2l);
TEST_f_f (exp, 3, M_E3l);
TEST_f_f (exp, 0.7L, 2.0137527074704765216L);
-
+ TEST_f_f (exp, 50.0L, 5184705528587072464087.45332293348538L);
+#ifdef TEST_LDOUBLE
+ /* The result can only be represented in long double. */
+ TEST_f_f (exp, 1000.0L, 0.197007111401704699388887935224332313e435L);
+#endif
END (exp);
}
@@ -3560,7 +3564,7 @@
TEST_ff_f (pow, 0.7L, 1.2L, 0.65180494056638638188L);
-#ifdef TEST_DOUBLE
+#if defined TEST_DOUBLE || defined TEST_LDOUBLE
TEST_ff_f (pow, -7.49321e+133, -9.80818e+16, 0);
#endif
============================================================
Index: math/test-ldouble.c
--- math/test-ldouble.c 1999/10/19 06:27:45 1.3
+++ math/test-ldouble.c 2001/05/07 21:28:04
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1997.
@@ -25,6 +25,7 @@
#define PRINTF_EXPR "Le"
#define PRINTF_XEXPR "La"
#define PRINTF_NEXPR "Lf"
+#define TEST_LDOUBLE 1
#ifndef __NO_MATH_INLINES
# define __NO_MATH_INLINES
============================================================
Index: math/test-ildoubl.c
--- math/test-ildoubl.c 1999/10/19 06:27:45 1.3
+++ math/test-ildoubl.c 2001/05/07 21:28:04
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1997.
@@ -27,6 +27,7 @@
#define PRINTF_XEXPR "La"
#define PRINTF_NEXPR "Lf"
#define TEST_INLINE
+#define TEST_LDOUBLE 1
#ifdef __NO_MATH_INLINES
# undef __NO_MATH_INLINES
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj