On Thu, 12 Feb 2009 12:15:10 -0100, Arnold Neumaier
<Arnold.Neumaier@xxxxxxxxxxxx> wrote:
Shin'ichi Oishi proposed
set round up
m=0.5*(l+u)
r=m-l
I think the formula that should be in the standard is
set round up
m=l+0.5*(u-l);r=m-l
In binary arithmetic, or when intermediate results are kept to higher
precision, the two formulas appear to be equivalent.
Given this last remark, I suggest to use Oishi's proposal at least
for binary arithmetic:
- it uses only 3 rather than 4 operations,
- the midpoint is always inside [l,u], see Higham: ASNA.