
2008/12/11 Thorsten Ottosen <thorsten.ottosen@dezide.com>:
We need to make either x or y one of the bounds of our interval. Let us assume it is y.
Furthermore, we know y has been specified such that it is representable exactly in float or double.
Not necessarily: typedef bounded<float>::type bfloat; bfloat ouch( sin(x), bfloat::constraint_type( cos(y), tan(z) ) ); ouch = log(7); Any of the bounds or the underlying value may be extended during computations involved in both the construction and the assignment (if I understand correctly), there's no guarantee that the compiler will not optimise away storage of the values. And actually what "truncation" is -- really a truncation (rounding towards 0), or rounding to the nearest representable value? Regards, Robert