develooper Front page | perl.perl5.porters | Postings from December 2003

t/base/num.t #47 questions

Thread Next
From:
Craig A. Berry
Date:
December 21, 2003 16:12
Subject:
t/base/num.t #47 questions
Message ID:
p06020405bc0be207803d@[172.16.52.1]
This test currently looks like so:

if ($^O eq 'ultrix') {
  # Ultrix enters looong nirvana over this.
  print "ok 47\n";
} else {
  $a = 0.00000000000000000000000000000000000000000000000000000000000000000001;
  print $a > 0 ? "ok 47\n" : "not ok 47\n";
}


Where does that magic number (which if I'm counting zeros right is 
1e-47) come from?  Would 1e-37 be just as good?  On OpenVMS VAX, 
DBL_MIN using the default floating point format is 
2.93873587705571877e-39, so this test fails.  More than likely this 
is the same problem encountered on ultrix, though the comment does 
not indicate whether it was ultrix VAX or ultrix MIPS that needs to 
skip the test.

Related questions:

Is there any way to get at NV_MIN from within Perl?

Is it bad form to import Config into the t/base tests?  Without that
there's really no way to distinguish where this test as it stands now 
should be run and where it shouldn't.

TIA.
-- 
________________________________________
Craig A. Berry
mailto:craigberry@mac.com

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About