Tools to check FPU accuracy
I have ported tools from http://notabs.org/fpuaccuracy/ to Linux.
To quote http://notabs.org/fpuaccuracy/
Intel overstates FPU accuracy. For nearly 20 years Intel has claimed high accuracy for the transcendental floating point instructions in its PC processor products. Intel documentation for the 1993 Pentium states: On the Pentium processor, the worst case error on functions is less than 1 ulp when rounding to the nearest-even and less than 1.5 ulps when rounding in other modes. This claim has never been true for the instructions fsin, fcos, fsincos, and fptan. The red in the plots below show ranges where the error exceeds 1.0 ulp.
- Inline GCC assembler for various x87 instructions - see x87 documention, details on instructions, and GCC documentation on Extended Asm
- Necessary changes to the C code
- Makefile
- Integration with GNU parallel
- Results on Intel Core i7-3520M CPU @ 2.90GHz
- gcc
- gnuplot
- xz
- mpfr-devel
On yum enabled system (Fedora,CentOS, RHEL) it can be installed with yum -y install gcc gnuplot xz mpfr-devel
- Compile with
make
- Review file
commands
with predefined tests. The most interesting ones are trigonometric functions. - Specify number of available CPUs for the GNU parallel tool in
Makefile
(variable JOBS) - Run the test - either specific ones with for example
make sin
(see the Makefile) or all tests withmake all
. Results are xzipped in the Results directory - Create plots with
make plot
- Check the plots (png files) in the Results directory