From: Swatosh, Joe R NWP (joe.r.swatosh_at_[hidden])
Date: 2000-10-19 12:30:48
> -----Original Message-----
> From: David Abrahams [mailto:abrahams_at_[hidden]]
> ----- Original Message -----
> From: "Swatosh, Joe R NWP" <joe.r.swatosh_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Thursday, October 19, 2000 12:47 PM
> > assert( 0.0f == numeric_cast<float>( 0.0 ) );
> > assert( 0.0 == numeric_cast<double>( 0.0 ) );
> Your test looks right to me, though the notion of
> floating-point equality is
> sometimes dicey.
Right. The only reason this works is we "know" that it really is zero. And
all zeros are equal, right? :)
> I guess the question is, is this a compiler bug or a bug in
> the library?
> Ah. We're being bitten by the asymmetry of numeric_limits<>::min() for
> non-integer (floating) types. I'll check in and post a fix
> shortly. Thanks
> for the bug report.
> P.S. Beman, could you add this test to the regression suite?
Thanks for the quick response.
Sorry about the last one being in HTML. I'm starting to hate Outlook.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk