The program may not be able to achieve high accuracy in it's current form, most possibly because of floating point operations error accumulation.
The function gausspivot is written based on a reference program provided in [1](Numerical Linear Algebra by R. Mokhtari & M. Rashidi).