If you care about numbers, do the math yourself. Learn how floating point numbers on computers work, and where they're likely to introduce problems.

The problem there being: to understand how floating point numbers on computers work, you have to understand how your particular architecture deals with floating point numbers -- as well as every other architecture your program might run on.

(There are multiple IEEE floating point standards, not to mention that a lot of hardware doesn't do any of them right)

I would suggest, in the spirit of your orriginal suggestion, that if you really care about precission, the best thing to do is to use an existing module designed to allow cross platform support for very precise mathematic operators (like Math::BigFloat) and if you really care about how the internals work, read the source.


In reply to Re: Re: How to get rounded numbers to =100% ?? by hossman
in thread How to get rounded numbers to =100% ?? by alarix

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.