The trouble with Perl's standard multiple-precision math modules is that they're overcomplicated and have some surprising behaviour.
In my limited experience with these modules I've found them to be well behaved as long as they're loaded with 'use Math::BigInt', 'use Math::BigFloat', 'use Math::BigRat'.
I regard this as the
sane way to load these modules.
Start loading them with 'use bignum', 'use bigint', etc. (which I regard as the
insane way) and they can get a bit tricky - I think largely because variables might not always be what you think they are.
If you have some examples of surprising behaviour when loading is done "sanely" then it's probably worth presenting them here.
(But, please, not buried in this thread. Instead create a new thread.)
I regard the major drawback to the standard multi-precision math modules as being their speed. However, speed is not always terribly important.
And, yes, those modules are doing decimal arithmetic.
Another decimal module that might be worth trying is Math::decNumber. I haven't got around to testing it yet, as it requires the decNumber C library - but trying it out is definitely on my todo list.
Cheers,
Rob
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.