Mainframe floating point math implementation.
paulkoning at comcast.net
Mon Mar 14 09:23:22 CDT 2016
> On Mar 13, 2016, at 4:39 PM, Charles Anthony <charles.unix.pro at gmail.com> wrote:
> The Multics distribution includes ISOLTS, a surprisingly complete and
> pedantic processor test program.
> It is unhappy with our emulated floating point.
> This should be the floating point used by the GE 6xx series and the
> Honeywell DPS8 and 6000 series.
> There is one particular failure that I am driven to seeking help for.
> If the intricacies of mainframe floating point math h/w do not interest
> you, time to delete this message and move on.
> For add and subtract operations, the operand with the smaller has its
> mantissa shifted right and the exponent incremented adjusted until the
> exponents match.
> From the DPS8M assembly language manual:
> "The mantissas are aligned by shifting the mantissa of the operand
> having the algebraically smaller exponent to the right the number of
> places equal to the absolute value of the difference in the two
> exponents. Bits shifted beyond the bit position equivalent to AQ71 are
> Sadly, ISOLTS complains about our implementation. It does helpfully provide
> what it says are the correct answers. Examination of the answers reveals
> the it is not the case that the shifted bits are lost; the shift mantissas
> are rounded according to rules that I can't quite characterize.
You may need to examine the schematics rather than rely on the manual. It's all too common that the manual only describes a rough approximation of reality.
A very nice in depth treatment of an old floating point implementation is here: "Design and correctness proof of an emulation of the floating-point operations of the Electrologica X8: a case study" by F.E.J. Kruseman Aretz - http://repository.tue.nl/674735 . That's a different machine, obviously, but it might give you some ideas to explore.
Still, rather than experiment with different implementations to look for one that passes diagnostics, working from the real design seems like the best approach. IEEE float algorithms may not be all that helpful; IEEE float came much later.
More information about the cctech