On Sat, 5 Jul 2003, Beman Dawes wrote:

> fpt_abs may do a unary "-" operation. I'm assuming, perhaps incorrectly,
> that is essentially subtraction and subject to a possible rounding error.

I don't think there is a system where the opposite of a representable
number would not be a representable number. So there should be no rounding
error when changing signs. At least not with IEEE-754 floating point
numbers.

Moreover, 0-x may lead to results different from -x. So changing sign is
essantially "not" a subtraction :-).

Guillaume

PS: for those who wonder how 0-x can be different from -x, think about
exceptional cases like x=0 or x=NaN.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to