Skip to content

Commit

Permalink
Add further tests of libm functions.
Browse files Browse the repository at this point in the history
This patch adds more randomly-generated tests of various libm
functions that are observed to increase ulps on x86_64.  (This process
must eventually converge, when my random test generation stops finding
inputs that increase the listed ulps, except maybe for any cases
uncovered where the errors exceed the maximum allowed 9ulp error and
so indicate actual libm bugs needing fixing.)

Tested for x86_64 and x86 and ulps updated accordingly.

	* math/auto-libm-test-in: Add more tests of acosh, atanh, clog,
	clog10, csqrt, erfc, exp2, expm1, log10, log2 and sinh.
	* math/auto-libm-test-out: Regenerated.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
  • Loading branch information
Joseph Myers committed May 5, 2015
1 parent a6ab6cc commit 31450d9
Show file tree
Hide file tree
Showing 5 changed files with 2,927 additions and 75 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2015-05-05 Joseph Myers <joseph@codesourcery.com>

* math/auto-libm-test-in: Add more tests of acosh, atanh, clog,
clog10, csqrt, erfc, exp2, expm1, log10, log2 and sinh.
* math/auto-libm-test-out: Regenerated.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

2015-04-30 Daniel Marjamäki <daniel.marjamaki@evidente.se>

[BZ #18265]
Expand Down
23 changes: 23 additions & 0 deletions math/auto-libm-test-in
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ acosh 0x1p5000
acosh 0x1.80a368p+0
acosh 0x1.0b9d3e9fc19fbp+0
acosh 0x1.11eab6p+0
acosh 0x1.0fffaap+0
acosh max no-test-inline

asin 0
Expand Down Expand Up @@ -376,6 +377,7 @@ atanh 0x3.dfb1f5db0ceccp-4
atanh 0x2.251b2a64c85dep-4
atanh -0x2.e3458cp-4
atanh 0x3.91d9f3c80c72d7acp-4
atanh -0x2.6c52c26567198p-4
# Bug 16352: underflow exception may be missing.
atanh 0x1p-500 missing-underflow
atanh 0x1p-5000 missing-underflow
Expand Down Expand Up @@ -574,6 +576,11 @@ clog -0x9.93d164127d9fp-4 0x7.c5c8d8p-4
clog -0xa.5920ap-4 -0x6.2cda5p-4
clog 0xd.d05c38ebb1b4p+60 -0x3.c22fdp+44

clog -0xa.19f8ec252c58d5p-4 0x7.d10cdec29a141538p-4
clog -0xa.7ac41a0b417cb8fp-4 -0x6.c5a32eaeedd4p-4
clog 0x3.c16p-136 0x8p-152
clog -0x1.0a69de710590dp+0 -0x7.bc7e121e2b0d1088p-4

clog 0x1.fffffep+127 0x1.fffffep+127
clog 0x1.fffffep+127 1.0
clog 0x1p-149 0x1p-149
Expand Down Expand Up @@ -717,6 +724,11 @@ clog10 -0x9.93d164127d9fp-4 0x7.c5c8d8p-4
clog10 -0xa.5920ap-4 -0x6.2cda5p-4
clog10 0xd.d05c38ebb1b4p+60 -0x3.c22fdp+44

clog10 -0xa.19f8ec252c58d5p-4 0x7.d10cdec29a141538p-4
clog10 -0xa.7ac41a0b417cb8fp-4 -0x6.c5a32eaeedd4p-4
clog10 0x3.c16p-136 0x8p-152
clog10 -0x1.0a69de710590dp+0 -0x7.bc7e121e2b0d1088p-4

clog10 0x1.fffffep+127 0x1.fffffep+127
clog10 0x1.fffffep+127 1.0
clog10 0x1p-149 0x1p-149
Expand Down Expand Up @@ -966,6 +978,9 @@ csqrt -0x4.15ca1p+0 -0x8p-152
csqrt 0xf.a24adp+28 0x8.0f148p+36
csqrt 0x1.f9610ap+4 0x9.87716p+4
csqrt 0x5.9cc21p-4 -0x1.fb1ec91b40dcdp+0
csqrt -0x7.31291c9fdae04p-160 -0x8p-152
csqrt 0x1.d60caep+0 0x7.a7d468p+0
csqrt -0xb.e2bc1cd6eaa7p-180 0x8p-152

csqrt 0x1.fffffep+127 0x1.fffffep+127
csqrt 0x1.fffffep+127 1.0
Expand Down Expand Up @@ -1141,6 +1156,7 @@ erfc 0xb.227499103357d84p+0
erfc 0xd.28abfp-4
erfc 0x1.5289fep+0
erfc 0x4.b48498p+0
erfc 0x2.f8646cp+0

exp 0
exp -0
Expand Down Expand Up @@ -1275,6 +1291,8 @@ exp2 -0x1.567cc8p+0
exp2 -0x1.bbbd76p+0
exp2 -0x1.3045fep+8
exp2 0xa.87b8bp+0
exp2 -0xe.2ce69p-4
exp2 -0xc.1bf12p-16

expm1 0
expm1 -0
Expand Down Expand Up @@ -1330,6 +1348,7 @@ expm1 0x6.660247486aed8p-4
expm1 0x6.289a78p-4
expm1 0x6.1b4d318238d4a2a8p-4
expm1 0x5.fb8dc64e91a74p-4
expm1 0x3.735f497c4e67535cp-4
# Bug 16353: underflow exception may be missing
expm1 0x4.0000000000000028p-16384 missing-underflow

Expand Down Expand Up @@ -1815,6 +1834,7 @@ log10 0x1.7163aep+0
log10 0xa.9d0d4p-4
log10 0x1.251ec6p+0
log10 0x1.022e82p+0
log10 0x9.b3727e3feb538p-4

log1p 0
log1p -0
Expand Down Expand Up @@ -1860,6 +1880,7 @@ log2 0x1.07465bdc7e41b52ep+0
log2 0xf.4dfb4p-48
log2 0x1.0a588ep+0
log2 0xb.e77c6p-4
log2 0x1.4fe37ep+0
log2 min
log2 min_subnorm

Expand Down Expand Up @@ -2306,6 +2327,8 @@ sinh -0x3.ca68c96337692p-4
sinh -0x3.92da05a85024b314p-4
sinh -0x3.3e6292ed442d450cp-4
sinh 0x7.6e259d2436fc4p-4
sinh 0x3.d6e088p-4
sinh -0x7.688eap-4

sqrt 0
sqrt -0
Expand Down
Loading

0 comments on commit 31450d9

Please sign in to comment.