From: Jens Maurer (Jens.Maurer_at_[hidden])
Date: 2001-01-16 12:16:34
Daryle Walker wrote:
> Some might find it useful to go to the next (or previous) representable
> value of a numeric object, even if the difference is not one. (Some numeric
> types could have even spacing, like fixed-points, and others could have
> varying spacing, like floating-points or rationals.)
This seems to require non-portable system support for the built-in types.
We've avoided that for now, but we may not be able to avoid that for
the future when we want to have serious numerics without ISO C99.
> We could do this for "next" and "prior" handling:
I don't think overloading "next" and "prior" for numeric types is a good
idea. If we had a namespace boost::numeric distinct from namespace
boost, we may do that there, but "next" and "prior" were really invented
for iterator use, i.e. discrete stuff. Plus, it doesn't really
apply operator++ to the underlying type in your suggested numeric
semantics. Please find a new name for it.
What about "next_representable" or so?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk