Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: small correction to the Vienna Proposal



Chenyi Hu wrote:
Thanks. Very valid point! But, how about m = 0.5*l + 0.5*u to avoid both problems?

In 3-digit decimal arithmetic, your proposal for [l,u]=[9.99,9.99] leads
to m not in [l,u].



Ian McIntosh wrote:
<quote>
m = 0.5 * (l + u)  will overflow when the sum l + u does, eg, when both l
and u are in the most positive half of the positive representable range,
or both in the most negative half of the negative representable range.

m = l + 0.5*(u - l)  will overflow when the difference u - l does, eg,
when l is negative and u positive and each is in the most nonzero half
of the representable range for its sign.
<end quote>

However, the second case will be extremely rare compared to the first
one, since it does not arise naturally.


Arnold Neumaier