Re: Problem with Float type variable
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