X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMath%2FBigFloat.pm;h=8aa6a6604b6076277519aa5b72d5482ea8c47cc3;hb=74a2feed3f7ab8f6e9b1144cca2f3eb4f6fd9498;hp=56d6efe46c95fb8525500fbd987770633ba88887;hpb=5d7098d560a042a848a6e60f96567ce4b694c6c7;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Math/BigFloat.pm b/lib/Math/BigFloat.pm index 56d6efe..8aa6a66 100644 --- a/lib/Math/BigFloat.pm +++ b/lib/Math/BigFloat.pm @@ -26,9 +26,9 @@ qw( sub new { my ($class) = shift; my ($foo) = fnorm(shift); - panic("Not a number initialized to Math::BigFloat") if $foo eq "NaN"; bless \$foo, $class; } + sub numify { 0 + "${$_[0]}" } # Not needed, additional overhead # comparing to direct compilation based on # stringify @@ -74,6 +74,7 @@ sub fnorm; sub fsqrt; sub fnorm { #(string) return fnum_str local($_) = @_; s/\s+//g; # strip white space + local $^W = 0; # $4 and $5 below might legitimately be undefined if (/^([+-]?)(\d*)(\.(\d*))?([Ee]([+-]?\d+))?$/ && "$2$4" ne '') { &norm(($1 ? "$1$2$4" : "+$2$4"),(($4 ne '') ? $6-length($4) : $6)); } else {