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:

#!perl use warnings; use strict; use bignum; my $n = -1; print "10 ** $n = " . 10 ** $n . "\n";
returns this:
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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.