7  Inverting an Almost-Zero Matrix

The conjugate gradient method solves this in about 2000 iterations, and is easy to program. Matlab had this built-in in a form that could solve the problem. The answer is  0.72507834626840. The Mathematica code that follows uses compilation for speed. Bornemann obtained 100 digits. Here they are:
0.7250783462684011674686877192511609688691805944795089578781647692077731899945962835735923927864782020. D. Laurie reports that even Jacobi's iterative method is able to solve this.

diag[dim_] := diag[dim] = N[Prime[Range[dim]]]  RowBox[{RowBox[{RowBox[{mult, =, RowBo ... bsp;  {stop}] ; x〚1〛}], ]}], ,,  , {{mult[_], _Real, 1}}}], ]}]}], ;}]

conjgrad[20000, Table[1, {20000}], 3000]

0.725078346268406


Created by Mathematica  (June 27, 2004)