Note that I strongly discourage the use of integer.pm. The first paragraph of the documentation contains this whopper: "but on those without floating point hardware, it can make a big difference in performance". Good luck finding a computer without floating point acceleration that is still running. But even if you do, the slow down from doing floating point calculations is quite unlikely to be noticeable much less "a big difference" when talking about a Perl script.

Even worse is the other whopper from the first paragraph: "On many machines, this doesn't matter a great deal for most computations". Actually, it very often matters a lot for lots of computations not just because it prevents fractional values from being preserved but also because it very often greatly reduces the size of integer values that can be used.

int, however, allows faithful and accurate use of integer arithmetic to at least 52 bits on just about every platform I've seen Perl run on. Just use that instead.

- tye        


In reply to Re^3: Loop Not Entered (integer.pm--) by tye
in thread Loop Not Entered by choroba

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.