summaryrefslogtreecommitdiff
path: root/t/opbasic
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2016-10-27 07:46:22 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2016-10-28 22:04:48 -0400
commit85272d315820be85a9069783ae2be8878e1e42a4 (patch)
tree35bdaf1813054f56cbefb0fa9f3c4e8dd7768860 /t/opbasic
parent4cb05021f1602b1c29295f791d76ba4b38426f2a (diff)
downloadperl-85272d315820be85a9069783ae2be8878e1e42a4.tar.gz
Use the new metalevel definitions for fp inf/nan/range
There are still hacks (in a good sense) of detecting "vax float" in the cpan/ modules (patches submitted upstream, customized moves done), but that is fine since the new Config symbols will be available only in the future.
Diffstat (limited to 't/opbasic')
-rw-r--r--t/opbasic/arith.t7
1 files changed, 3 insertions, 4 deletions
diff --git a/t/opbasic/arith.t b/t/opbasic/arith.t
index 81f272a7a8..75dc56e134 100644
--- a/t/opbasic/arith.t
+++ b/t/opbasic/arith.t
@@ -427,12 +427,11 @@ if ($^O eq 'VMS') {
eval {require Config; import Config};
$vms_no_ieee = 1 unless defined($Config{useieee});
}
-my $vax_float = (pack("d",1) =~ /^[\x80\x10]\x40/);
if ($^O eq 'vos') {
print "not ok ", $T++, " # TODO VOS raises SIGFPE instead of producing infinity.\n";
}
-elsif ($vms_no_ieee || $vax_float) {
+elsif ($vms_no_ieee || !$Config{d_double_has_inf}) {
print "ok ", $T++, " # SKIP -- the IEEE infinity model is unavailable in this configuration.\n"
}
elsif ($^O eq 'ultrix') {
@@ -462,8 +461,8 @@ else {
# [perl #120426]
# small numbers shouldn't round to zero if they have extra floating digits
-if ($vax_float) {
-for (1..8) { print "ok ", $T++, " # SKIP -- VAX not IEEE\n" }
+unless ($Config{d_double_style_ieee}) {
+for (1..8) { print "ok ", $T++, " # SKIP -- not IEEE\n" }
} else {
try $T++, 0.153e-305 != 0.0, '0.153e-305';
try $T++, 0.1530e-305 != 0.0, '0.1530e-305';