68881/2 FPU functional test v1.0
by dml/2016

This is a small program which tests FPU operation. It is designed for socketed
68881/2 co-processors, some of which have been noticed to fail or misbehave for
various reasons (broken tracks, damaged or dirty pins, broken sockets, damaged
silicon, overclocking failures, factory rejects, maybe dodgy clones...).

It is not a performance test or benchmark. It only tests fidelity & correctness. 
It should detect any faults in calculations using most of the FPU instruction 
set, rounding and precision modes and condition flags.

It does not test every single aspect of the chip but is still quite exhaustive
and sensitive enough to fail under emulation.


Notes:

Three large random tables are used. One provides unit double precision values in 
the range (-1.0 -> +1.0), another raises unit random values to 2^+/-N where N is
a random in the range (-128 -> +127), another uses pure random binary data which
may include denormalised or NaN values. These tables are used as source data for
many of the tests.

The tests themselves perform multiple calculations and commit intermediate 
results to memory. The memory results are combined with a running hash. A 
disturbance of just one bit in any part of a calculation is enough to trigger 
a test fail.

The extended and packed memory formats are not tested. Only single and double.
Extended format is used for most intermediate calculations.

Intermediate test results which involve or produce NaN do not propagate through
the test so sensitivty remains high for each step of calculation.


Compatibility:

This is intended to run on real 68881/2 FPU hardware.

It has not been tested on 68040 or 68060 internal FPUs but may work providing:

1) The 68040 or 68060 is running the software floating point emulation package
   for missing 68881/2 instructions.

2) A new [expect.dat] is recorded for these processors using [fpurec.tos] and 
   renaming the exported [expectsv.dat] file to [expect.dat].
 
3) The recording of [expect.dat] is made on a machine known to work properly!  
