in reply to Determining when Math::BigFloat is necessary?
Play with it like this:use Data::Dumper; $str = $ARGV[0]; $a = $str + 0.0; if ($a =~ m/INF/) { use bignum; $a = $str + 0.0; no bignum; } print Dumper($a);
perl -w test.pl 9e5000, will give you a BigInt perl -w 12.3, will give you a normal guyWith limited testing, I cannot promise that it will work for all the situations, so try it out.
|
|---|