Using lapack 3.1 fortran version linked into a c++ program I tried to test something simple and was amazed by the result.
when inverting a symetrical 4x4 real matrix by means of spptrf and spptri or dpptrf and dpptri the result is so much different.
These are the elements of the matrix i tried to invert
a(0,0) = 1.25331
a(0,1) = 1.15695
a(1,1) = 1.25331
a(0,2) = 1.15695
a(1,2) = 0.910093
a(2,2) = 1.25331
a(0,3) = 1.19817
a(1,3) = 0.980975
a(2,3) = 1.24706
a(3,3) = 1.25331
when i stored a in single precision and inverted the the matrix by means of spptrf and spptri the result was
- Code: Select all
2338.06 -559.483 3647.85 -5426.94
-559.483 141.22 -834.062 1254.24
3647.85 -834.062 5977.17 -8781.9
-5426.94 1254.24 -8781.9 12945.4
when i did everything in double precision i obtained
- Code: Select all
2339.55 -559.834 3650.2 -5430.43
-559.834 141.303 -834.619 1255.06
3650.2 -834.619 5980.89 -8787.41
-5430.43 1255.06 -8787.41 12953.6
To be honest ... WOW! what a bunch of bits can do.

