Boost logo

Boost :

Subject: Re: [boost] [review][constrained_value] Review of Constrained Value Library begins today
From: Robert Kawulak (robert.kawulak_at_[hidden])
Date: 2008-12-08 10:36:27

> From: Thorsten Ottosen

> Now, it might also be useful to be able to specify that
> numbers that are
> "close" (defined by the user) to the bounds should be rounded to the
> bounds, but I think that was already possible in your library. Right?

Yes, although not out of the box. You'd have to write a simple error policy that
does the rounding.

> So I think my conclusion is the following: The fact that
> floating point
> calculations are not easily portable is not an argument
> against having
> constrained values of floats;

It's not portability that has been the main concern here. It is the very small
set of guarantees given by the standard regarding FP calculations, lacking some
of the natural assumptions everybody has when working with FP. Also lacking some
of the guarantees that would make preserving the invariant of constrained float
an easy task.

Best regards,

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