On 7/18/2017 11:38 AM, Paul Koning via cctalk wrote:
On Jul 18, 2017, at 11:04 AM, Douglas Taylor via cctalk <cctalk@classiccmp.org> 
wrote:

How does SIMH perform floating point operations for the PDP-11 simulation?

If I run a numerical computation on real PDP-11 hardware and also on Simh how 
do you talk about the comparison?
You can look for yourself: PDP11/pdp11_fp.c.  The code clearly implements the 
floating point operations the hard way: picking apart the pieces and 
manipulating them as needed.

For stuff like this, the devil is always in the details.  Some floating point 
implementations have odd corner cases that aren't necessarily well documented, 
if at all.  But it's clear the intent is that SIMH should produce the same 
answers as a real PDP-11.

An example of floating point emulation that would be wrong is to convert to IEEE and 
operate on "double" values, then convert back.  I've done that in the past as a 
first stab, but you can't do that if you want the emulation to be anywhere near accurate.

        paul


Paul

The pdp11_fp.c code is quite intricate. If simh was a simple simulation it would take the easy route and use the intel fp co-processor as you point out, but it doesn't. It actually 'emulates' what the pdp11 would do in hardware. Very interesting, that way you can get the exact same answers from the emulator that you would from the real hardware.

It would not be an interesting comparison if the two got slightly different numerical answers.

Thanks for pointing out the pdp11_fp.c code.

Doug

Reply via email to