Boost logo

Boost :

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

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

| ----- Original Message -----
| From: "Gabriel Dos Reis" <Gabriel.Dos-Reis_at_[hidden]>
| >
| > Actually, the rules are simple and they should not be hard to follow..
| >
| > If the system is conforming to LIA then the floating point values set is
| > symmetric because LIA's model is sign-magnitude.
| >
| > For non-LIA system (actually, only systems using radic-complement
| > representation should exhibit that behaviour) there is a notion of
| > most-negative value which is quite distinct from what one calls min()
| > in case of floating point values.
| >
| > Yes, the terminology is quite confusing, but I weren't there when
| > LIA-1 was adopted as an international standard.
| Gaby,
| I think you and Matt have both missed my point (I explained this to Matt in
| a private email).

Probably because the original question didn't reflect what you
intended? ;-)

| ... Suppose you have an arbitrary type T (possibly
| user-defined) for which numeric_limits<> is specialized. How do you find the
| minimum representable value?

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? :-)

-- Gaby

Boost list run by bdawes at, gregod at, cpdaniel at, john at