• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: if statement
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >if statement (From: Nathan <email@hidden>)
 >Re: if statement (From: Nathan <email@hidden>)
 >Re: if statement (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Which framework for Wifi?
  • Next by Date: Re: Cocoa Classes from C++?
  • Previous by thread: Re: if statement
  • Next by thread: Re: if statement
  • Index(es):
    • Date
    • Thread