robin wrote:
> "glen herrmannsfeldt" <gah@[EMAIL PROTECTED]
> wrote in message
> news:CZSdnfkDXvuBFyTeRVn-tg@[EMAIL PROTECTED]
(snip regarding HER, HDR, and the lack of normalization in the early
versions of S/360.)
>>>Except, of course, initially for HER and HDR.
>> The 1964 Principles of Operation makes this clear.
(snip)
>>Well, one could always add zero, still probably faster than divide,
> Definitely faster than divide, but that took an extra instruction (4
bytes)
> and possibly an extra constant (4 or 8 bytes) when there was precious
> little store to hold the extras.
> The real problem with HER and HDR, however, with the unnormalized
> version was the loss of precision if the most-significant nibble ws 1.
In sqrt you can likely live with that until the last iteration.
With the common implementation for binary machines, you lose, anyway.
For S/360 the last iteration is done something like:
y4=y3+(x/y3-y3)/2
this is required for full precision HFP arithmetic, even with a
normalizing HDR.
(x/y3-y3) normally won't have many significant bits, so there is probably
no loss in the non-normalizing HDR.
It is also fairly common to do the initial approximation in fixed point.
If one really wanted to, one could test the exponent bits prior to the
HDR at the end.
-- glen
DE FR0,BUFF GIVE TWO P***** OF NEWTON-RAPHSON
AU FR0,BUFF ITERATION
HER FR0,FR0
DER FR2,FR0 (X/Y1+Y1)/2 = (Y1-X/Y1)/2+X/Y1 TO GUARD
AU FR0,ROUND LAST DIGIT-. ADD ROUNDING FUDGE
SER FR0,FR2
HER FR0,FR0
AER FR0,FR2


|