Boost logo

Boost :

From: Gabriel Dos Reis (Gabriel.Dos-Reis_at_[hidden])
Date: 2000-10-20 10:10:12


"David Abrahams" <abrahams_at_[hidden]> writes:

| ----- Original Message -----
| From: "Gabriel Dos Reis" <Gabriel.Dos-Reis_at_[hidden]>
| >
| > If is an integer type, then you're done; else you have a floating
| > point type and the canonical model is sign-magnitude and you take
| > -max(). Yes that assumes only integer and floating point types are
| > supported by numeric_limits<>.
| >
| > Floating point types which don't use sign-magnitude aren't covered --
| > actually I don't think they are widely used, since LIA or IEEE models
| > tends to be the standard; both models use sign-magnitude.
| >
| > Am I still missing your point? :-)
|
| I think so. It's all well and good to give your personal prescription for
| doing this, based on what you think is widely-used, etc., but is it
| supported by the standard text?

Please, have at lookt at LIA-1 text.

| ... What if you have a user-defined floating
| type that is denorm_indeterminate?

You're stuck -- from the standards point of view. However in
practice, numeric_limits<floating_poing>::min() will be a runtime
value in that case -- that is just consistency. That however is not
covered by the C++ standard (as is the case for the rest).

-- Gaby


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