Re: Floating Point Approximations.

From: Jonathan Leffler <jleffler_at_earthlink.net>
Date: Thu, 29 Mar 2007 04:16:09 GMT
Message-ID: <d4HOh.132151$_73.41326_at_newsread2.news.pas.earthlink.net>


David Cressey wrote:
> Here's another example of floating point errors, that's even simpler than
> the 21200 plus 2.5% example.
> [...]

Kernighan & Plauger in "The Elements of Programming Style" said words to the effect of:

A wise old programmer said, "Floating point arithmetic is like moving piles of sand; each time you do it, you lose a little sand and pick up a little dirt".

-- 
Jonathan Leffler                   #include <disclaimer.h>
Email: jleffler_at_earthlink.net, jleffler_at_us.ibm.com
Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
Received on Thu Mar 29 2007 - 06:16:09 CEST

Original text of this message