From: Nicholas Clark Date: Wed, 9 Jan 2008 11:47:12 +0000 (+0000) Subject: 1e4 isn't large enough with 16 byte long doubles (at least on x86_64). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=86a885eb6a64bbb479db8bcf7997a4c1b74a5e74;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/lib/Math/Trig.t b/lib/Math/Trig.t index 93012b4..ea19a6c 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