Re: Perl 5.7.2 Has Been Released
authorHugo van der Sanden <hv@crypt.org>
Wed, 18 Jul 2001 05:58:46 +0000 (06:58 +0100)
committerNick Ing-Simmons <nik@tiuk.ti.com>
Wed, 18 Jul 2001 06:43:59 +0000 (06:43 +0000)
Message-Id:  <200107180458.f6I4wlJ19966@crypt0.demon.co.uk>

p4raw-id: //depot/perl@11404

ext/POSIX/POSIX.t

index 2c80924..2c52f26 100755 (executable)
@@ -87,7 +87,7 @@ if ($Config{d_strtod}) {
     $lc = &POSIX::setlocale(&POSIX::LC_NUMERIC, 'C') if $Config{d_setlocale};
     ($n, $x) = &POSIX::strtod('3.14159_OR_SO');
 # we're just checking that strtod works, not how accurate it is
-    print (("3.14159" eq $n + 0) && ($x == 6) ?
+    print ((abs("3.14159" - $n) < 1e-6) && ($x == 6) ?
           "ok 14\n" : "not ok 14\n");
     &POSIX::setlocale(&POSIX::LC_NUMERIC, $lc) if $Config{d_setlocale};
 } else { print "# strtod not present\n", "ok 14\n"; }