From ae165b0ce2d006b04a799f86d6abe3d466b7bfa9 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Thu, 2 Mar 2000 20:58:43 +0000 Subject: [PATCH] Further long double patches from Spider Boardman. p4raw-id: //depot/cfgperl@5453 --- t/comp/use.t | 4 +-- t/lib/bigfltpm.t | 104 +++++++++++++++++++++++++++---------------------------- t/op/pack.t | 3 ++ t/op/universal.t | 2 +- 4 files changed, 58 insertions(+), 55 deletions(-) diff --git a/t/comp/use.t b/t/comp/use.t index c3cdb70..89cb31a 100755 --- a/t/comp/use.t +++ b/t/comp/use.t @@ -111,7 +111,7 @@ print "ok ",$i++,"\n"; print "ok ",$i++,"\n"; eval "use lib v100.105"; - unless ($@ =~ /lib version 100\.105 required--this is only version 35\.36/) { + unless ($@ =~ /lib version 100\.105 required--this is only version 35\.3/) { print "not "; } print "ok ",$i++,"\n"; @@ -121,7 +121,7 @@ print "ok ",$i++,"\n"; print "ok ",$i++,"\n"; eval "use lib 100.105"; - unless ($@ =~ /lib version 100\.105 required--this is only version 35\.36/) { + unless ($@ =~ /lib version 100\.105 required--this is only version 35\.3/) { print "not "; } print "ok ",$i++,"\n"; diff --git a/t/lib/bigfltpm.t b/t/lib/bigfltpm.t index 4cfd36e..5d97f1b 100755 --- a/t/lib/bigfltpm.t +++ b/t/lib/bigfltpm.t @@ -186,78 +186,78 @@ $Math::BigFloat::rnd_mode = 'trunc' -0.006:-1:0 -0.006:-2:0 -0.0065:-3:/-0\.006|-6e-03 --0.0065:-4:/-0\.0065|-6\.5e-03 --0.0065:-5:/-0\.0065|-6\.5e-03 +-0.0065:-4:/-0\.006(?:5|49{5}\d+)|-6\.5e-03 +-0.0065:-5:/-0\.006(?:5|49{5}\d+)|-6\.5e-03 $Math::BigFloat::rnd_mode = 'zero' -+2.23:-1:2.2 --2.23:-1:-2.2 -+2.27:-1:2.3 --2.27:-1:-2.3 -+2.25:-1:2.2 --2.25:-1:-2.2 -+2.35:-1:2.3 --2.35:-1:-2.3 ++2.23:-1:/2.2(?:0{5}\d+)? +-2.23:-1:/-2.2(?:0{5}\d+)? ++2.27:-1:/2.(?:3|29{5}\d+) +-2.27:-1:/-2.(?:3|29{5}\d+) ++2.25:-1:/2.2(?:0{5}\d+)? +-2.25:-1:/-2.2(?:0{5}\d+)? ++2.35:-1:/2.(?:3|29{5}\d+) +-2.35:-1:/-2.(?:3|29{5}\d+) -0.0065:-1:0 -0.0065:-2:/-0\.01|-1e-02 -0.0065:-3:/-0\.006|-6e-03 --0.0065:-4:/-0\.0065|-6\.5e-03 --0.0065:-5:/-0\.0065|-6\.5e-03 +-0.0065:-4:/-0\.006(?:5|49{5}\d+)|-6\.5e-03 +-0.0065:-5:/-0\.006(?:5|49{5}\d+)|-6\.5e-03 $Math::BigFloat::rnd_mode = '+inf' -+3.23:-1:3.2 --3.23:-1:-3.2 -+3.27:-1:3.3 --3.27:-1:-3.3 -+3.25:-1:3.3 --3.25:-1:-3.2 -+3.35:-1:3.4 --3.35:-1:-3.3 ++3.23:-1:/3.2(?:0{5}\d+)? +-3.23:-1:/-3.2(?:0{5}\d+)? ++3.27:-1:/3.(?:3|29{5}\d+) +-3.27:-1:/-3.(?:3|29{5}\d+) ++3.25:-1:/3.(?:3|29{5}\d+) +-3.25:-1:/-3.2(?:0{5}\d+)? ++3.35:-1:/3.(?:4|39{5}\d+) +-3.35:-1:/-3.(?:3|29{5}\d+) -0.0065:-1:0 -0.0065:-2:/-0\.01|-1e-02 -0.0065:-3:/-0\.006|-6e-03 --0.0065:-4:/-0\.0065|-6\.5e-03 --0.0065:-5:/-0\.0065|-6\.5e-03 +-0.0065:-4:/-0\.006(?:5|49{5}\d+)|-6\.5e-03 +-0.0065:-5:/-0\.006(?:5|49{5}\d+)|-6\.5e-03 $Math::BigFloat::rnd_mode = '-inf' -+4.23:-1:4.2 --4.23:-1:-4.2 -+4.27:-1:4.3 --4.27:-1:-4.3 -+4.25:-1:4.2 --4.25:-1:-4.3 -+4.35:-1:4.3 --4.35:-1:-4.4 ++4.23:-1:/4.2(?:0{5}\d+)? +-4.23:-1:/-4.2(?:0{5}\d+)? ++4.27:-1:/4.(?:3|29{5}\d+) +-4.27:-1:/-4.(?:3|29{5}\d+) ++4.25:-1:/4.2(?:0{5}\d+)? +-4.25:-1:/-4.(?:3|29{5}\d+) ++4.35:-1:/4.(?:3|29{5}\d+) +-4.35:-1:/-4.(?:4|39{5}\d+) -0.0065:-1:0 -0.0065:-2:/-0\.01|-1e-02 -0.0065:-3:/-0\.007|-7e-03 --0.0065:-4:/-0\.0065|-6\.5e-03 --0.0065:-5:/-0\.0065|-6\.5e-03 +-0.0065:-4:/-0\.006(?:5|49{5}\d+)|-6\.5e-03 +-0.0065:-5:/-0\.006(?:5|49{5}\d+)|-6\.5e-03 $Math::BigFloat::rnd_mode = 'odd' -+5.23:-1:5.2 --5.23:-1:-5.2 -+5.27:-1:5.3 --5.27:-1:-5.3 -+5.25:-1:5.3 --5.25:-1:-5.3 -+5.35:-1:5.3 --5.35:-1:-5.3 ++5.23:-1:/5.2(?:0{5}\d+)? +-5.23:-1:/-5.2(?:0{5}\d+)? ++5.27:-1:/5.(?:3|29{5}\d+) +-5.27:-1:/-5.(?:3|29{5}\d+) ++5.25:-1:/5.(?:3|29{5}\d+) +-5.25:-1:/-5.(?:3|29{5}\d+) ++5.35:-1:/5.(?:3|29{5}\d+) +-5.35:-1:/-5.(?:3|29{5}\d+) -0.0065:-1:0 -0.0065:-2:/-0\.01|-1e-02 -0.0065:-3:/-0\.007|-7e-03 --0.0065:-4:/-0\.0065|-6\.5e-03 --0.0065:-5:/-0\.0065|-6\.5e-03 +-0.0065:-4:/-0\.006(?:5|49{5}\d+)|-6\.5e-03 +-0.0065:-5:/-0\.006(?:5|49{5}\d+)|-6\.5e-03 $Math::BigFloat::rnd_mode = 'even' -+6.23:-1:6.2 --6.23:-1:-6.2 -+6.27:-1:6.3 --6.27:-1:-6.3 -+6.25:-1:6.2 --6.25:-1:-6.2 -+6.35:-1:6.4 --6.35:-1:-6.4 ++6.23:-1:/6.2(?:0{5}\d+)? +-6.23:-1:/-6.2(?:0{5}\d+)? ++6.27:-1:/6.(?:3|29{5}\d+) +-6.27:-1:/-6.(?:3|29{5}\d+) ++6.25:-1:/6.2(?:0{5}\d+)? +-6.25:-1:/-6.2(?:0{5}\d+)? ++6.35:-1:/6.(?:4|39{5}\d+) +-6.35:-1:/-6.(?:4|39{5}\d+) -0.0065:-1:0 -0.0065:-2:/-0\.01|-1e-02 -0.0065:-3:/-0\.006|-6e-03 --0.0065:-4:/-0\.0065|-6\.5e-03 --0.0065:-5:/-0\.0065|-6\.5e-03 +-0.0065:-4:/-0\.006(?:5|49{5}\d+)|-6\.5e-03 +-0.0065:-5:/-0\.006(?:5|49{5}\d+)|-6\.5e-03 &fcmp abc:abc: abc:+0: diff --git a/t/op/pack.t b/t/op/pack.t index e4c7a9c..2c45fdd 100755 --- a/t/op/pack.t +++ b/t/op/pack.t @@ -19,6 +19,9 @@ print ($#ary == $#ary2 ? "ok 1\n" : "not ok 1\n"); $out1=join(':',@ary); $out2=join(':',@ary2); +# Using long double NVs may introduce greater accuracy than wanted. +$out1 =~ s/:9\.87654321097999\d*:/:9.87654321098:/, +$out2 =~ s/:9\.87654321097999\d*:/:9.87654321098:/ print ($out1 eq $out2? "ok 2\n" : "not ok 2\n"); print ($foo =~ /def/ ? "ok 3\n" : "not ok 3\n"); diff --git a/t/op/universal.t b/t/op/universal.t index eb6ec3c..7de8199 100755 --- a/t/op/universal.t +++ b/t/op/universal.t @@ -70,7 +70,7 @@ test ! $a->can("export_tags"); # a method in Exporter test (eval { $a->VERSION }) == 2.718; test ! (eval { $a->VERSION(2.719) }) && - $@ =~ /^Alice version 2.719 required--this is only version 2.718 at /; + $@ =~ /^Alice version 2.71(?:9|8999\d+) required--this is only version 2.718 at /; test (eval { $a->VERSION(2.718) }) && ! $@; -- 2.7.4