This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In UNICOS division is really lossy, better use
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 5 Sep 2001 23:26:23 +0000 (23:26 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 5 Sep 2001 23:26:23 +0000 (23:26 +0000)
a tolerance test.

p4raw-id: //depot/perl@11901

ext/Time/HiRes/HiRes.t

index be462e6..feeb5cf 100644 (file)
@@ -86,7 +86,7 @@ else {
 # Two-arg tv_interval() is always available.
 {
     my $f = tv_interval [5, 100_000], [10, 500_000];
-    ok 9, $f == 5.4, $f;
+    ok 9, abs($f - 5.4) < 0.001, $f;
 }
 
 if (!$have_gettimeofday) {