summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSpider Boardman <spider@orb.nashua.nh.us>2000-08-29 15:58:56 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-30 00:16:17 +0000
commite64f0054c65de1a097c72a5d43578d1a5bcf0e38 (patch)
tree3f7a71c749b2598931e8cbeefad99c27265764c1 /t
parent50fc18f75fc128393bd7b22383951e97fd67542f (diff)
downloadperl-e64f0054c65de1a097c72a5d43578d1a5bcf0e38.tar.gz
Make the epsilon to be relative, not absolute.
Subject: Re: [ID 20000829.039] Not OK: perl v5.7.0 +DEVEL6899 +[ID on alpha-dec_osf-ld 5.1 (UNINSTALLED) Message-Id: <200008292358.TAA31114@leggy.zk3.dec.com> p4raw-id: //depot/perl@6905
Diffstat (limited to 't')
-rwxr-xr-xt/lib/trig.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/lib/trig.t b/t/lib/trig.t
index ac3445023b..6949622f0a 100755
--- a/t/lib/trig.t
+++ b/t/lib/trig.t
@@ -26,7 +26,8 @@ if ($^O eq 'unicos') { # See lib/Math/Complex.pm and t/lib/complex.t.
}
sub near ($$;$) {
- abs($_[0] - $_[1]) < (defined $_[2] ? $_[2] : $eps);
+ my $e = defined $_[2] ? $_[2] : $eps;
+ $_[1] ? (abs($_[0]/$_[1] - 1) < $e) : abs($_[0]) < $e;
}
print "1..23\n";