>On Sat, 5 Jul 2003, Beman Dawes wrote:
>
>> What is happening here? It seems to me that the error checking code
>> itself that computes the values to be checked (d1 and d2) introduces one
>> to four possible additional rounding errors. (The error checking code
>> always does one subtraction, possibly one subtraction in an abs, possibly
>> another subtraction in an abs, and possibly one division). That would
>> account for the observed behavior.
>
>Sorry, I don't see all the substractions you are speaking about, I only
>see these three floating-point operations in close_at_tolerance:
>
> FPT diff = detail::fpt_abs( left - right );
> FPT d1 = detail::safe_fpt_division( diff, detail::fpt_abs( right ) );
> FPT d2 = detail::safe_fpt_division( diff, detail::fpt_abs( left ) );
fpt_abs may do a unary "-" operation. I'm assuming, perhaps incorrectly, that is essentially subtraction and subject to a possible rounding error.
--Beman
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost