• 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: Problem with Float type variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with Float type variable


  • Subject: Re: Problem with Float type variable
  • From: Scott Ribe <email@hidden>
  • Date: Sun, 16 Aug 2009 14:45:13 -0600
  • Thread-topic: Problem with Float type variable

> I mean there is only 1 digit after the decimal. It should not have the range
> problem with a value this small.

Because you're translating from a decimal representation to a binary one,
and back again. Consider a very simple case: 0.1. What sum of powers of two
equals 0.1? (Hint, it's an infinite series, and thus not representable in
any fixed number of binary digits.)


--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice


_______________________________________________

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: 
 >Re: Problem with Float type variable (From: Adil Saleem <email@hidden>)

  • Prev by Date: Re: Cleaning "garbage" in Core Data
  • Next by Date: Turn off menu highlight in outline view?
  • Previous by thread: Re: Problem with Float type variable
  • Next by thread: initWithCoder but I do not have nib file
  • Index(es):
    • Date
    • Thread