The folder formp contains the fortran files needed for nlfit. These files were tested by fitting the complementary error function to a Pade approximate in ..\LogAigau\Welcome.doc htm
10/30/2008 11:32 AM 2,024 Ishft.for ß for those systems that do not support the ISHFT command in the usual way. This slows the calculation of the 2nd derivative array, but has no other effect. The data statement needed for arithmetic shifts is
DATA
IAA/-2147483648/
This is the largest integer
and includes the sign. In Watfor this
need to be changed to the equivalent
DATA IAA/Z80000000/
On the original Vax compilers it would need to be
DATA IAA/’80000000’X/
The fortran is set up to fit 20 constants with it=63 for approximately 260 digit accuracy in the matrix inversion routine.
The maximum number of constants is determined by maxcon=20 in nlfit.for and robmin.for.
The precision is approximately 4.2 x it in decimal digits. The time to form the storage matrix MPPPCC is almost independent of it. Thus the time required when MPSMINV is not needed increases only slightly as it is increased. When high precision is wanted for an almost linearly dependent system such as the Pade approximate form in LogAigau\Welcome.doc htm, MPSMINV matrix inversions dominate the code’s cpu time requirements. These go as it2. An investigation of the accuracy effects of various values of it was carried out in LogAigau\The number of Multiple Precision integers.htm. An it value of 15, is adequate, 31 is better and 63 introduces a minor problem in the early stages of converging on an undesired local minimum. The multiplication algorithm does not contain intermediate normalizations which limits it to it=63. The codes here all have it=63 and I recommend it owing to the fact that the time increase occurs only when the code is almost at its limits and it saves making a series of runs in which it is slowly increased. The files containing it=63 are
If all it= parameters are not changed, some of the values are un-initialized. Watfor finds this, but not the other compilers.
The dimension of x in fA(x) is set in nlfit on line [10] above.
[10] parameter(maxcon=20,maxdim=2,it=63)
Watcom nlfit.wpj
Watfor nlfit.for
– change last 4 lines from # to $ and run.
Be sure to change back before using watcom
again. Best debugger, slow.
Power Station nlfit-PS\nlfit.mdp – This like to have its own folder.
Intel -10 nlfit.vfproj – mot modern and fastest code tested.