Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-10-20 11:40:24


----- Original Message -----
From: "Gabriel Dos Reis" <Gabriel.Dos-Reis_at_[hidden]>
To: <boost_at_[hidden]>
Cc: <c++std-lib_at_[hidden]>
Sent: Friday, October 20, 2000 11:42 AM
Subject: Re: [boost] numeric_limits defect?

> "David Abrahams" <abrahams_at_[hidden]> writes:
>
> | From: "Gabriel Dos Reis" <Gabriel.Dos-Reis_at_[hidden]>
> |
> | > | ... What if you have a user-defined floating
> | > | type that is denorm_indeterminate?
> | >
> | > You're stuck -- from the standards point of view.
> |
> | That is what I'm claiming may be a defect.
>
> Well, I disagree. The standard can't give meaning to something it
> knows nothing about (the user defined floating type).

See #3 below.

> Even if the user-defined floating point type has denorm_absent, what
> do you think min() should be?

The standard says:

18.2.1.2 numeric_limits members
static T min() throw();
1 Minimum finite value. 181)
2 For floating types with denormalization, returns the minimum positive
normalized value.
3 Meaningful for all specializations in which is_bounded != false, or
is_bounded == false
&& is_signed == false.

Clearly, unless the type is a floating type with denormalization, min()
should return the "Minimum finite value".


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