> -----Original Message-----
> From: David Abrahams [mailto:abrahams@mediaone.net]
>
> ----- Original Message -----
> From: "Swatosh, Joe R NWP" <joe.r.swatosh@usace.army.mil>
> To: <boost@egroups.com>
> 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.
>
> -Dave
>
> P.S. Beman, could you add this test to the regression suite?
>
Thanks for the quick response.