Re: Integers and standard



Richard Maine <nospam@xxxxxxxxxxxxx> wrote:
glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx> wrote:

Richard Maine wrote:

Don't try that one at home, folks. At least not on any machines you are
likely to have at home... or probably at work either. It worked for the
floatting point representations of that machine, but it doesn't work (by
about 300 orders of magnitude) for most machines. All that code had to
be fixed when the sim lab got new computers.

It works for S/360 and successors, but not many others that
I can think of. (I have a P/370 so I can try it at home.
Hercules users can also try it at home.)

Yep. It wasn't a S/360, but it was a machine that used the S/360's
floatting point format (egad, what a horrible format, but that's a
separate matter). I'm having trouble recalling the machine (not a
household word in most households), so I'll just let it go with "S/360
format".


It would also work on VAXen, if I remember correctly. The floating
point format was completely different from that of the S/360, but it
also had the property that the difference between double and single
precision was just extra bits on the mantissa.

In an environment where IBM mainframes and VAXen were the only
machines to run Fortran programs on, this trick was used a lot and
often intentionally. One could save the instruction which was needed
to correctly round the single precision value, when the correct
rounding didn't matter. One would also play tricks with EQUIVALENCE,
when there was no subroutine call around to do it with argument
association.


--
Klaus Wacker klaus.wacker@xxxxxxx
Experimentelle Physik V http://www.physik.uni-dortmund.de/~wacker
Universitaet Dortmund Tel.: +49 231 755 3587
D-44221 Dortmund Fax: +49 231 755 4547
.


Quantcast