summaryrefslogtreecommitdiff
path: root/t/base
diff options
context:
space:
mode:
authorAllen Smith <allens@cpan.org>2002-09-07 01:25:45 -0400
committerhv <hv@crypt.org>2002-09-08 17:10:38 +0000
commit20f6aaab8d64a33be1150bb7a380a1b5d03267cb (patch)
treed31bbbbc33401f4b56b0e88fd778a96a0eaf4b5d /t/base
parentd3d0e6f1233c0621cb4930e677ea82e761029cf7 (diff)
downloadperl-20f6aaab8d64a33be1150bb7a380a1b5d03267cb.tar.gz
Re: [PATCH: perl #17849] (corrected) Long double bugs - sprintf.t _and_ num.t
From: "Allen Smith" <easmith@beatrice.rutgers.edu> Message-Id: <10209070525.ZM1584639@puck2.rutgers.edu> p4raw-id: //depot/perl@17874
Diffstat (limited to 't/base')
-rw-r--r--t/base/num.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/base/num.t b/t/base/num.t
index 714881e977..6a93355d3a 100644
--- a/t/base/num.t
+++ b/t/base/num.t
@@ -1,6 +1,6 @@
#!./perl
-print "1..49\n";
+print "1..50\n";
# First test whether the number stringification works okay.
# (Testing with == would exercize the IV/NV part, not the PV.)
@@ -179,3 +179,9 @@ print $a == 80000.0 ? "ok 48\n" : "not ok 48\n";
$a = 1.0000000000000000000000000000000000000000000000000000000000000000000e1;
print $a == 10.0 ? "ok 49\n" : "not ok 49\n";
+
+# From Math/Trig - number has to be long enough to exceed at least DBL_DIG
+
+$a = 57.295779513082320876798154814169;
+print ok($a*10,572.95779513082320876798154814169,1e-10) ? "ok 50\n" :
+ "not ok 50 # $a\n";