After finding blazar's bug in bigint? posting, I decided to beat on bignum to see how it handled logs (generally, as far as I could tell, perfectly well). However, this gave me a surprise:
returns this:#!perl use warnings; use strict; use bignum; my $n = -1; print "10 ** $n = " . 10 ** $n . "\n";
10 ** -1 = NaN
which is, obviously, wrong. I'm using ActiveState Perl, (Binary build 819 [267479]). Has anybody seen this with other Perls? (Please don't tell me it should be undefined; the answer should be 0.1, which it is if the use bignum; line is commented out). I've submitted a bug to ActiveState, but I'm curious as to whether it's more basic than that.
I've filed a bug report (http://rt.perl.org/rt3/Ticket/Display.html?id=41050.). Now, to try to come up with a patch...
emc
At that time [1909] the chief engineer was almost always the chief test pilot as well. That had the fortunate result of eliminating poor engineering early in aviation.
—Igor Sikorsky, reported in AOPA Pilot magazine February 2003.In reply to use bignum and exponentiation by swampyankee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |