This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
infnan: if the mulexp10 value goes to zero, return it.
authorJarkko Hietaniemi <jhi@iki.fi>
Sun, 12 Oct 2014 21:11:02 +0000 (17:11 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 13 Oct 2014 01:58:07 +0000 (21:58 -0400)
numeric.c

index ab42efc..75d348d 100644 (file)
--- a/numeric.c
+++ b/numeric.c
@@ -1029,6 +1029,8 @@ S_mulexp10(NV value, I32 exponent)
             exponent--;
             value /= 10;
         }
+        if (value == 0.0)
+            return value;
 #endif
     }
     for (bit = 1; exponent; bit <<= 1) {