Does your LINUX calculate numerically correct ?

 

When I lately was involved in moving software to a new LINUX cluster I found that this was not as simple as it may sound. Specifically I found that in house developed software is highly sensitive to how it uses libraries, statically or dynamically linkage. Using statically linked libraries will almost always give a better reproducibility of the numerical results than dynamically linkage. None the less it is not clear that calculation results are always the same even for statically linked binaries, as LINUX per default uses extended precision when using double precision floating point values for calculation. This actually holds thru even for other operating systems such as MS Windows. Most BSD-flavors and the MACOS X however do not use this hardware dependent capability thus the reproducibility of numerical values should be better.

 

Given the extended precision capability as implemented in all INTEL FPU units it should be tested how this hardware dependency impacts the numerical calculation of any code. Today the FPU is most often used for transcendental number numerics, which are not handled by SSE or other CPU-units.

 

Given the issue of reproducibility of numbers and correct numerical calculation I have created a number of test codes based on published example codes for a number of programming languages.

 

The code snippets may be used freely for none commercial usage, however the copyright remains with the author. The code snippets may be used in initial self verification tests of numerical software codes.

 

Testmath

-gsl

-c

-powershell

-tcl

-java

-python

-groovy

 

EXAMPLE OUTPUT from UBUNTU 8.04 (Desktop 32bit)

 

EXAMPLE OUTPUT from UBUNTU 8.04 (Desktop 64bit)

 

EXAMPLE OUTPUT from SUSE 8 (Desktop 32bit)

 

EXAMPLE OUTPUT from OPENSUSE 10 (Desktop 32bit)