Re: if statement
Re: if statement
- Subject: Re: if statement
- From: "Sean McBride" <email@hidden>
- Date: Wed, 28 May 2008 10:45:57 -0400
- Organization: Rogue Research
On 5/28/08 10:11 AM, Graham Cox said:
>what is OB? Is it 1, 2, 3 etc? Or is it 0.9999999999, 1.999999999....?
>If the latter, what will "if (OB == 1)" produce - true or false? The
>point is that floating point values have limited precision (after all,
>you are trying to represent all possible numbers in just 32-bits -
>they just don't all fit!).
And for that gcc has -Wfloat-equal "Warn if floating point values are
used in equality comparisons."
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden