[Tutor] If elif not working in comparison

Sean Perry shaleh at speakeasy.net
Tue Mar 29 02:46:15 CEST 2005


gerardo arnaez wrote:
> On Mon, 28 Mar 2005 09:27:11 -0500, orbitz <orbitz at drorbitz.ath.cx> wrote:
> 
>>Floats are inherintly inprecise.  So if thigns arn't working like you
>>expect don't be surprised if 0.15, 0.12, and 0.1 are closer to the same
>>number than you think.
> 
> 
> Are you telling me that I cant expect 2 digit preceision?

Not without using round. Have *NO* faith in floating points. This is 
especially true when you are creating the decimals via division and the 
like.


More information about the Tutor mailing list