From 86a885eb6a64bbb479db8bcf7997a4c1b74a5e74 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Wed, 9 Jan 2008 11:47:12 +0000 Subject: [PATCH] 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 --- lib/Math/Trig.t | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) 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 -- 1.8.3.1