Boost logo

Boost :

Subject: Re: [boost] [review][constrained_value] Review of Constrained Value Library begins today
From: John Phillips (phillips_at_[hidden])
Date: 2008-12-11 14:07:38

Stjepan Rajko wrote:
> On Thu, Dec 11, 2008 at 9:07 AM, Johan Råde <rade_at_[hidden]> wrote:
>>> In other words, we always have to force at least one of x and y to
>>> be truncated in order to have any guarantee. If we can do that we might
>>> as
>>> well force both values to be truncated, right. I think that so far
>>> in this discussion is has been assumed that the bounds are truncated.
>> Forcing truncation may have a bad effect on performance.
>> That will be unacceptable to some users.
> I think the idea is to force truncation on the bounds when they are
> set in the constraint object, which for many use cases happens only
> once per bounded value.
> Stjepan

   If you want to say it a different way, he wants the process of
setting bounds to save something that is exactly representable in the
floating point type that is being used for the bound. Then moving it
from main memory to a register that may have more bits will not affect
the value. This would add a little to the cost of runtime changes to the
bounds, but that should be an uncommon enough operation to make the cost


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