Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The following code (when run without any arguments, so that the default @ARGV is picked up below) triggers some kind of strange bizarre bug in Math::BigFloat. It appears that I'm creating a value that is both 1 and 0 at the same time. Can someone help make it shorter into a test case I can submit?
The bug is that the numbers printed in the last line don't make sense. Somehow, both $e and 1-$e print as "1", though 1-"$e" properly prints as "0". (The true value of $e should in fact be somewhere between 1-2**(-54) and 1) When I use Data::Dumper, then $e is shown as '1' (note the quotes). However, that doesn't really help isolate the bug, as this also creates something that dumps as '1', but doesn't show the "both $e and 1-$e are 1" anomaly:
My perl environment is perl 5.8.7 on cygwin.
--
In reply to Help me make a test case for Math::BigFloat by fizbin
|
|