[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFA/PATCH gtest - NSNumber float != double
From: |
Alexander Malmberg |
Subject: |
Re: RFA/PATCH gtest - NSNumber float != double |
Date: |
Wed, 22 Jan 2003 00:53:44 +0100 |
David Ayers wrote:
[snip]
> Hmm, I'll take your word for it. I just recalled back in the dark ages
> someone told me (or I read it somewhere) that 25.1 would somehow be
> represented as 2.51 * 10^1 and that a float or double only stored the
> mantissa and exponent which shouldn't result in any discrepancies here.
It does, but in base 2, and the fraction 25.1/16 can't be represented
exactly in base 2; you get 2^4 * 1.10010 0011 0011 0011 ...
- Alexander Malmberg