I think I detect a note of intended irony in that last sentence, but basically that's what you get when you try to do base 10 math in a base 2 machine. The sooner you become of aware of it, the sooner you can deal with it.

This part probably sounds like one of those tirades from old farts that begin "back in my day.." .. but .. back in my day, one of the required courses was "Programming for Numerical Methods" or some such title, and we spent the class trying to predict how poorly our computations would proceed based on understanding the limits of the algorithms. There were two results to each computation, the result and the error estimate, and the second result was more important because it told you if could take the first one seriously or not. I took the class in the 80's and our textbook dated back to the 60's. This has become less important over time because improvements in computational speed and memory allow us to use floating point numbers of sufficiently high resolution that we avoid a lot of these problems .. but here we are in 2015 and 1/10th is still giving us fits.

Dum Spiro Spero

In reply to Re^3: floating point addition by GotToBTru
in thread floating point addition by kresike

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.