From: Robin Houston Date: Thu, 10 May 2001 12:56:39 +0000 (+0100) Subject: t/op/64bitint.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fecea80608f57b51d05df84f3a72f304337280cb;p=p5sagit%2Fp5-mst-13.2.git t/op/64bitint.t Message-ID: <20010510125639.A2119@penderel> p4raw-id: //depot/perl@10074 --- diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index d88c2c7..f88b0fb 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -3059,7 +3059,13 @@ sub const { } elsif ($sv->FLAGS & SVf_IOK) { return $sv->int_value; } elsif ($sv->FLAGS & SVf_NOK) { - return $sv->NV; + # try the default stringification + my $r = "".$sv->NV; + if ($r =~ /e/) { + # If it's in scientific notation, we might have lost information + return sprintf("%.20e", $sv->NV); + } + return $r; } elsif ($sv->FLAGS & SVf_ROK && $sv->can("RV")) { return "\\(" . const($sv->RV) . ")"; # constant folded } elsif ($sv->FLAGS & SVf_POK) {