Float precision and float equality

Steven D'Aprano steven at REMOVE.THIS.cybersource.com.au
Mon Dec 7 03:27:55 EST 2009


On Sun, 06 Dec 2009 14:54:37 -0800, Carl Banks wrote:

> (I remember once struggling in a homework assignment over seemingly
> large discrepancies in a calculation I was doing, until i realized that
> the actual numbers were on the scale of 10**11, and the difference was
> around 10**1, so it really didn't matter.)

Well that depends on the accuracy of the calculations, surely? If the 
calculations were accurate to one part in 10**20, then an error around 
10**1 is about ten trillion times larger than acceptable.

*wink*



-- 
Steven



More information about the Python-list mailing list