Welcome

                The zip ChidersZip.zip contains the code needed for this folder.  It is made by mkzip.bat.

                The subroutines discussed in this folder are used to form Chi and its derivatives.  They vary in the amount of precision that they use.  These subroutines have been tested in wave functions calculations and as part of ..\nlfit\NlfitSub\Welcome.htm.  The stand alone (SA) codes in this folder have been compiled and linked, but have not been tested.

                The value of chi is given by

(1.1)

The first derivatives of chi are

(1.2)

Define

                                (1.3)

Then

(1.2)

The second derivatives are approximated as

(1.4)

These are only slightly modified when the object is to find a wave function WaveFunction\Variance Minimization.doc .htm.  Subroutines for finding Chi (1.1), PC (1.2), PPCC (1.4) are described below.  The second derivative array is symmetrical and in principle positive definite, MatrixInverse\Cholesky\Welcome.htm.  A  series of experiments described in MatrixInverse\Cholesky\Singular.doc .htm shows that if the partial of fA is made multiple precision before the multiplication in (1.4), the matrix “almost always” has an inverse.  Unfortunately this requires Ndat × N×(N+1)/2  mujltiple precision multiplications.  These are “schoolboy” multiplications requiring 632 integer multiplications each.  Codes are set up below to evaluate these in double precision, quad precision – Intel-10’s quadruple precision probably uses double precision internally and thus should be much faster than the equivalent multiple precision in MultiplePrecision\Bob\mp9, and finally in multiple precision.

                The code opens two binary, unformatted, sequential with no boundaries, files.  The first file fdat.tmp is normally constructed by the codes described in NlfitCP, e.g. nlfitm.wpj.  This file contains fi and ei for the Ndat points.  The second file fapfa.tmp is normally constructed by the codes described in ..\PolySA, e.g. ..\PolySA\polysa.wpj.  It contains fA(xi), then ∂fA(x)/∂ck for the Nv values of ck for each of the Ndat values of xi With these two files it is straightforward to calculate values in (1.1), (1.2) and (1.4).  The output in Chiders.tmp, an unformatted binary file, is NV, Chi, the Nv values of ∂χ2/∂ck, and the Nv´(Nv+1)/2 values of ∂2χ2/(∂ck∂cn)

1.       Subroutines

a.       ChiPDD.for – double precision input and output – used by nlfit\NlfitSub\Welcome.htm
 SUBROUTINE ChiDer(CHI,PC,PPCC,PFA,NPOW,NV,NDAT) reads binary files 9 and 10

b.      ChiPDQ.for – double precision input, quadruple precision output.

c.       ChiPQQ.for – quadruple precision input and output.  Intel-10 only

d.      ChiPDM.for – double precision input, multiple precision output.

e.      CHIPQM.FOR – quadruple precision input, multiple precision output.  Intel-10 and MultiplePrecision\Bob\ShiftLess\mpbob.for and MPBobQ.for  Intel-10 must be used for the compilation.

f.        ChiPMM.for – multiple precision input and output – chi double precision. 

g.       MPPPCC.for – double precision input, double precision PC output, Multiple Precision MPPPCC output.  Ein is an argument.  Reads eI, fA(xi) and fA/cK from an unformatted file.  Used to find a wave function in Pade4\Welcome.doc, .htm

Stand Alone Codes  (SA)

2.       These codes are called as
Chiders D [2]
In this call the D[Q,M] means that the output PC and PPCC is double precision.  The number 2 is the value of Npow, which defaults to 1 if this value is not present.   Testing input is from ../robfit/TemplFit/eff fdat.tmp and fapfa.tmp

a.       ChiDers.wpj –   Chiders.exe appears in local folder – No Q’s. Testing input is from ../robfit/TemplFit/eff fdat.tmp and fapfa.tmp.
Chiders DD 65 6
Uses 1a, 1d, and 1f.
 The bat file MkChiDers.bat puts Chiders.exe in c:\watcom\binnt.

b.      ChiDers.vfproj  -   Best default – Almost all options are supported – tells which are not.