Re: -dateWithTimeIntervalSinceNow: 64-bits may overflow
Re: -dateWithTimeIntervalSinceNow: 64-bits may overflow
- Subject: Re: -dateWithTimeIntervalSinceNow: 64-bits may overflow
- From: Jerry Krinock <email@hidden>
- Date: Wed, 12 Oct 2011 16:56:55 -0700
On 2011 Oct 12, at 14:40, Sean McBride wrote:
> Strange since NSTimeInterval is double in both 32 and 64 bit. Why did you use FLT_MAX and not DBL_MAX?
Oh, probably when I wrote that code I wasn't aware DBL_MAX, and FLT_MAX was more than enough.
> No doubt the latter would be even worse. :)
Not necessarily. Multiple overflows tend toward a random number generator.
_______________________________________________
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