Subject: | [PATCH] patch for VAX (netbsd-vax) |
The VAX floating point is different: smaller range (and no inf/nan, but that is not problem with Math-BigInt).
The attached patch makes Math-BigInt work with VAX (the Perl 5.26 is expected to support netbsd-vax).
Subject: | 0001-vax-netbsd-different-float-range.patch |
From dff6159181fa11bec766cff281da098a0421db3d Mon Sep 17 00:00:00 2001
From: Jarkko Hietaniemi <jhi@iki.fi>
Date: Sat, 22 Oct 2016 08:58:30 -0400
Subject: [PATCH] vax-netbsd: different float range
---
cpan/Math-BigInt/t/bigintpm.inc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cpan/Math-BigInt/t/bigintpm.inc b/cpan/Math-BigInt/t/bigintpm.inc
index e996c69..d793ce1 100644
--- a/cpan/Math-BigInt/t/bigintpm.inc
+++ b/cpan/Math-BigInt/t/bigintpm.inc
@@ -564,9 +564,13 @@ is($x->bsstr(), '105e+13', # not 1.05e+15
$z = 1e+129; # definitely a float (may fail on UTS)
# don't compare to $z, since some Perl versions stringify $z into something
# like '1.e+129' or something equally ugly
+SKIP:{
+my $vax_float = (pack("d",1) =~ /^[\x80\x10]\x40/);
+skip("vax float range smaller", 1) if $vax_float;
$x = $CLASS->new($z);
is($x->bsstr(), '1e+129',
qq|\$x = $CLASS->new($z); \$x->bsstr() = "1e+129"|);
+}
###############################################################################
# test for whitespace including newlines to be handled correctly
--
2.9.3