Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2006-10-19 05:06:31


tirath wrote:
> The query...
> Before I started using the library, I had this assumption: let A be a
> float with an exact representation (i.e. width=0). If we cast A to a
> double, the resulting double will have a non-zero width -
> specifically the width will be equal to the extra precision afforded
> to doubles vs floats.

I'm not familiar with the interval lib, but if a float is an exact value,
then promoting it to a wider type will result in an exact value as well. I
assume what you're looking for is a way to say "here is a float, that is
holding the nearest representable value, but is inexact (has up to 0.5ulp
error)" ? Then that error would propagate to the double as you expect.

John.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net