diff options
author | Robin Houston <robin@cpan.org> | 2001-05-10 13:56:39 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-10 22:23:41 +0000 |
commit | fecea80608f57b51d05df84f3a72f304337280cb (patch) | |
tree | c7dd249d4596c33365811a998d9fa952e191519d /ext | |
parent | 374f98998144a5e58919ddd781cb75f885e750f6 (diff) | |
download | perl-fecea80608f57b51d05df84f3a72f304337280cb.tar.gz |
t/op/64bitint.t
Message-ID: <20010510125639.A2119@penderel>
p4raw-id: //depot/perl@10074
Diffstat (limited to 'ext')
-rw-r--r-- | ext/B/B/Deparse.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index d88c2c7dab..f88b0fbd63 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) { |