On Oct 11, 2014, at 7:36 AM, Scott Ribe <[email protected]> wrote:

> On Oct 11, 2014, at 2:04 AM, Gerriet M. Denkmann <[email protected]> wrote:
> 
>> Note: converting to double does NOT loose any digits.
> 
> Well, it has to. Not sure how you're getting that output, but a double has 52 
> bits for the mantissa, so the largest integer it can represent without losing 
> precision is about 4.5x10^15.

Oops. Forgot the implicit MSB 1 in normalized doubles, so I guess max is 
~9X10^15.

Anyway, your number is well into the range where it lose binary digits, so it 
would just be pure (very unlikely) luck if that specific integer happened to be 
one that is precisely representable as a double.

-- 
Scott Ribe
[email protected]
http://www.elevated-dev.com/
(303) 722-0567 voice





_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to