Kurt W Hirchert <[log in to unmask]> wrote:
...
>At 08:29 PM 2/22/01 +0100, Pierre Hugonnet wrote:
>>Also, for some values of (a,b):
>>
>>abs(a-b) <= k * spacing(a) may be .true.
>>
>>while
>>
>>abs(a-b) <= k * spacing(b) may be .false.
>
>For some values of (a,b):
>
>abs(a-b) <= k * abs(a) * epsilon(a) may be .true.
>
>while
>
>abs(a-b) <= k * abs(b) * epsilon(b) may be .false.
>
>
>If such asymmetry is disturbing, use min(spacing(a),spacing(b)) or
>min(abs(a)*epsilon(a),abs(b)*epsilon(b)) to get a symmetric test.
What ever happened to:
ABS(A-B) <= toler * ABS(A+B)
For a suitably small value of TOLER.
--
J. Giles
|