Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: floating point addition

by GotToBTru (Prior)
on Jan 12, 2015 at 23:06 UTC ( [id://1113008]=note: print w/replies, xml ) Need Help??


in reply to Re^2: floating point addition
in thread floating point addition

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

Replies are listed 'Best First'.
Re^4: floating point addition
by SimonPratt (Friar) on Jan 13, 2015 at 11:11 UTC

    I wouldn't say that its very old fart-ish. I finished uni relatively recently (about 4 years ago) and floating point errors (and the inherent inaccuracies with storing base 10 values in base 2 format) were certainly covered in our courses. Indeed, I would expect this to be basic knowledge covered in any good Software Dev / Programming course.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1113008]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-26 03:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found