Author mark.dickinson
Recipients belopolsky, draghuram, mark.dickinson, rhettinger, stutzbach
Date 2010-05-12.19:07:58
SpamBayes Score 0.00687354
Marked as misclassified No
Message-id <1273691281.25.0.139513169858.issue8692@psf.upfronthosting.co.za>
In-reply-to
Content
>I was planning to add a "if (dx > (double) LONG_MAX)" check.  Would
> that be sufficient?

Hmm.  It's subtle.  On an LP64 machine, LONG_MAX will be 2**63-1, which isn't exactly representable as a double.  So (double) LONG_MAX would likely be 2.0**63 exactly (depending on rounding mode, but round-half-to-even is probably a safe assumption unless someone's deliberately messing around).  Then that check would fail for dx == 2.**63 exactly.

Turn it into '>=' rather than '>', and I *think* it's okay.
History
Date User Action Args
2010-05-12 19:08:01mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, belopolsky, draghuram, stutzbach
2010-05-12 19:08:01mark.dickinsonsetmessageid: <1273691281.25.0.139513169858.issue8692@psf.upfronthosting.co.za>
2010-05-12 19:07:59mark.dickinsonlinkissue8692 messages
2010-05-12 19:07:58mark.dickinsoncreate