From db0562f0f6a78b868db85f5ec10f73940b254224 Mon Sep 17 00:00:00 2001
From: Jarkko Hietaniemi
Date: Wed, 4 Feb 2015 06:48:07 -0500
Subject: [PATCH] infnan: in case NaN is broken by being zero, avoid dividing
by it
So that the test doesn't die too early.
---
t/op/infnan.t | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/t/op/infnan.t b/t/op/infnan.t
index 70f0a7d..dc1ff22 100644
--- a/t/op/infnan.t
+++ b/t/op/infnan.t
@@ -292,7 +292,12 @@ is($NaN * 2, $NaN, "twice NaN is NaN");
is($NaN / 2, $NaN, "half of NaN is NaN");
is($NaN * $NaN, $NaN, "NaN * NaN is NaN");
-is($NaN / $NaN, $NaN, "NaN / NaN is NaN");
+SKIP: {
+ if ($NaN == 0) {
+ skip "NaN looks like zero, avoiding dividing by it", 1;
+ }
+ is($NaN / $NaN, $NaN, "NaN / NaN is NaN");
+}
for my $f (@printf_fmt) {
is(sprintf("%$f", $NaN), "NaN", "$NaN sprintf %$f is NaN");
--
1.8.3.1