Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-10-19 12:42:15


----- Original Message -----
From: "Ullrich Koethe" <koethe_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, October 19, 2000 1:15 PM
Subject: Re: [boost] Bug in numeric_cast<> ??

> David Abrahams wrote:
> >
> > ----- Original Message -----
> > From: "Swatosh, Joe R NWP" <joe.r.swatosh_at_[hidden]>
> > Ah. We're being bitten by the asymmetry of numeric_limits<>::min() for
> > non-integer (floating) types.
>
> I've always wondered about the purpose of this asymmetry. Why is
> numeric_limits<int>::min() returning the smallest int, while
> numeric_limits<float>::min() returns the smallest *positive* float.
> Wouldn't a different name for both cases make things clearer? Is this a
> defect in the standard?

I think it's mostly for hyste^Horical reasons. Personally, /I/ think it's
stupid, but I don't think it rises to the level of "defect". It is fully
specified, implementable, (barely) usable behavior.

-Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk