Re: guard digits

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: guard digits

As an historical footnote to the original 360 floating-point kludge, one
might recall that originally the guard digits were there alright to prevent
loss of significance in calculations. But IBM messed up big time: The
algorithm was "truncate, then normalize" instead of "normalize, then
truncate". This had the most unfortunate effect of certain numbers, not all
that hard to come up with in the normal course of things, that could both be
greater than a floating point zero which would result in a floating point
add giving a result which was *less than* either of the summands among other
things. Other ops had similar problems. Not a good thing.

   I heard that Stanford published a paper detailing the flaws in the
floating point arithmetic on the original S/360s - I think that the thinly
veiled insult in Wirth's original paper on PL360 refers to Stanford's
analyses. Dr. Robert M. McClure said that he'd heard (this is ca. 1966/67
IIRC) that IBM spent a few million dollars fixing the problem on machines
out in the field that *had* to be retrofitted (remember that the control
store was variously holes in special cards, diode matrices, solenoids,
whatever depending on the model of 360, so fixes were costly).

   I personally tried playing with the FP on a 360/40 on High Street in
Poughkeepsie in 1969 - surprise! IBM hadn't fixed the fool thing inside its
own house. Poor old CE (apparently too incompetent to let out to the field)
told me he didn't know what I was talking about, as far as he knew the
machine in question didn't even have the FP option installed. Strange
thing - had it not had the feature, any FP loads, stores, adds, etc. would
have aborted instantly when I ran the tests, and the snapshot dumps wouldn't
have been able to display the stuff I was doing. Ah, well, ...

Ron Tatum

----- Original Message -----
From: <[hidden email]>
To: <[hidden email]>
Sent: Monday, May 09, 2005 9:03 AM
Subject: [hercules-390] guard digits

> "holloway_tim" <[hidden email]> wrote:
> > The reason we used to say "6-1/2" digit precision was that you're
> > always good for 6 digit accuracy and about half the time the 7th digit
> > will be usable too. Please note, however, that this refers to decimal
> > digits, not nybbles (or hex digits, if you want to use a mathematical
> > term rather than a storage term). And just to confuse the issue, that
> > also indicates precise conversion. One of our major problems is that
> > many rational decimal numbers (such as 7.3) are irrational in binary
> > and hex.
> That is about right, but even for decimal representation digit isn't
> a very good term.  1000001 has about six decimal digits of precision,
> 9999999 has about seven, yet both take seven digits to write.
> > The "guard" isn't the final nybble or 7th digit. It's an extra set of
> > bits that are only present in the FPU machine register itself. They
> > keep the computations more honest, but you can't access them in S/3xx
> > machine language, as they can't be loaded nor stored in RAM. In other
> > words, the S/370 machine-language FP registers are windows into the
> > larger physical FP registers.
> The guard digit is only used during floating point operations.
> It is not stored in the register.
> -- glen
> Community email addresses:
>   Post message: [hidden email]
>   Subscribe:    [hidden email]
>   Unsubscribe:  [hidden email]
>   List owner:   [hidden email]
> Files and archives at:
> Get the latest version of Hercules from:
> Yahoo! Groups Links

Community email addresses:
  Post message: [hidden email]
  Subscribe:    [hidden email]
  Unsubscribe:  [hidden email]
  List owner:   [hidden email]

Files and archives at:

Get the latest version of Hercules from: 
Yahoo! Groups Links

<*> To visit your group on the web, go to:

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to: