diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-01-09 11:47:12 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-01-09 11:47:12 +0000 |
commit | 86a885eb6a64bbb479db8bcf7997a4c1b74a5e74 (patch) | |
tree | 4ce39d246e0ff6fe2549bf000e1bb8398a00f1e2 | |
parent | d2ece331daee8e28f4c669904c9cfa6dee30dd74 (diff) | |
download | perl-86a885eb6a64bbb479db8bcf7997a4c1b74a5e74.tar.gz |
1e4 isn't large enough with 16 byte long doubles (at least on x86_64).
However, 1e5 does take us "to infinity and beyond"
(Plus use cmp_ok, for better diagnostics)
p4raw-id: //depot/perl@32914
-rwxr-xr-x | lib/Math/Trig.t | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/Math/Trig.t b/lib/Math/Trig.t index 93012b4e62..ea19a6c604 100755 --- a/lib/Math/Trig.t +++ b/lib/Math/Trig.t @@ -347,18 +347,18 @@ ok(near(csch(-100), -7.4402e-44, 1e-3)); ok(near(tanh(-100), -1)); ok(near(coth(-100), -1)); -ok(sinh(1e4) == Inf()); -ok(sech(1e4) == 0); -ok(cosh(1e4) == Inf()); -ok(csch(1e4) == 0); -ok(tanh(1e4) == 1); -ok(coth(1e4) == 1); - -ok(sinh(-1e4) == -Inf()); -ok(sech(-1e4) == 0); -ok(cosh(-1e4) == Inf()); -ok(csch(-1e4) == 0); -ok(tanh(-1e4) == -1); -ok(coth(-1e4) == -1); +cmp_ok(sinh(1e5), '==', Inf()); +cmp_ok(sech(1e5), '==', 0); +cmp_ok(cosh(1e5), '==', Inf()); +cmp_ok(csch(1e5), '==', 0); +cmp_ok(tanh(1e5), '==', 1); +cmp_ok(coth(1e5), '==', 1); + +cmp_ok(sinh(-1e5), '==', -Inf()); +cmp_ok(sech(-1e5), '==', 0); +cmp_ok(cosh(-1e5), '==', Inf()); +cmp_ok(csch(-1e5), '==', 0); +cmp_ok(tanh(-1e5), '==', -1); +cmp_ok(coth(-1e5), '==', -1); # eof |