C ALGORITHM 726, COLLECTED ALGORITHMS FROM ACM. C THIS WORK PUBLISHED IN TRANSACTIONS ON MATHEMATICAL SOFTWARE, C VOL. 20, NO. 1, MARCH, 1994, PP. 21-62. C C Remark -- to appear cat < README This is a package of routines, called ORTHPOL, for generating orthogonal polynomials and Gauss-type quadrature rules developed by Walter Gautschi. A description of the underlying methods can be found in a companion paper published in ``ACM Transactions on Mathematical Software''. There are files of four kinds in this package: the fortran netlib programs r1mach,d1mach, generating single- and double-precision machine constants for a variety of computers (Chapter 0); driver programs in fortran, called test1.f, test2.f, ... (Chapter 1); files called test1.out, test2.out, ... containing the output of the respective drivers when run on the Cyber 205 (Chapter 1); the fortran subroutines making up the core of the package (Chapters 2 - 6). The machine constants highlighted in the netlib programs are those for the Cyber 205. They have been kindly supplied by David A. Seaman of the Purdue University Computing Center. If the package is to be run on a different computer, the Cyber 205 machine constants have to be commented out and the constants appropriate for the particular machine uncommented. Structurally, the package is one single UNIX file, which, when given a name, say ``package'', can be broken up into its individual component files by the command sh < package At the same time, this will create a Makefile which allows the user to compile and run (on a variety of computers) all test programs by typing make or the N-th test by typing make testN.out.local The output of testN in either case is placed into a file called testN.out.local. On computers which do not support UNIX, the individual files can be recovered by noting that they each start with a line of the form cat < filename and end with the line C-END-OF-FILE To see which files must be assembled to run each test, refer to the lines starting with 'TESTn = ' in Makefile. The following is a brief description of the individual files of the package. r1mach.f a netlib program generating single-precision machine constants for a variety of computers d1mach.f a netlib program generating double-precision machine constants for a variety of computers test1.f relates to Example 3.1 of the companion paper, where orthogonal polynomials are generated relative to a weight function on (-1,1) having square root singularities at 1, -1, 1/omega, -1/omega, with omega between 0 and 1 test1.out contains the output of test1.f test2.f relates to Example 3.2, where orthogonal polynomials are generated relative to a weight function on (0,1) having a logarithmic singularity at the origin as well as an algebraic singularity with exponent sigma greater than -1 test2.out contains the output of test2.f test3.f relates to Example 4.1, implementing Stieltjes's procedure and the Lanczos algorithm to generate discrete Legendre polynomials test3.out contains the output of test3.f test4.f relates to Example 4.2, where a discretization procedure is applied to generate orthogonal polynomials relative to the Chebyshev weight function plus a constant test4.out contains the output of test4.f test5.f relates to Example 4.3 illustrating the use of a discretization procedure to generate orthogonal polynomials relative to the Jacobi weight function with a mass point of given strength placed at the left end point test5.out contains the output of test5.f test6.f relates to Example 4.4 implementing a discretization procedure to generate orthogonal polynomials for the logistics density function test6.out contains the output of test6.f test7.f relates to Example 4.5 employing a general-purpose discretization procedure to generate the half-range Hermite polynomials test7.out contains the output of test7.f test8.f relates to Example 4.6, where Example 3.1 is redone by means of a discretized modified Chebyshev algorithm test8.out contains the output of test8.f test9.f relates to Example 5.1, redoing Example 3.2 for sigma=1/2, using a modification algorithm test9.out contains the output of test9.f test10.f relates to Example 5.2, generating induced Legendre polynomials test10.out contains the output of test10.f test11.f relates to Example 5.3, illustrating the performance of the routines chri.f and gchri.f (see below) in the case of the Jacobi weight function multiplied or divided by a linear and quadratic factor test11.out contains the output of test11.f recur.f a subroutine generating the recursion coefficients of classical orthogonal polynomials drecur.f a double-precision version of recur.f cheb.f a subroutine implementing the modified Chebyshev algorithm dcheb.f a double-precision version of cheb.f sti.f a subroutine generating the recursion coefficients of discrete orthogonal polynomials by Stieltjes's procedure dsti.f a double-precision version of sti.f lancz.f a subroutine generating the recursion coefficients of discrete orthogonal polynomials by Lanczos's algorithm dlancz.f a double-precision version of lancz.f mcdis.f a subroutine computing the recursion coefficients (to a given degree of approximation) of continuous and mixed-type orthogonal polynomials by means of a multi- component discretization procedure dmcdis.f a double-precision version of mcdis.f qgp.f a general-purpose quadrature routine for use in mcdis.f or in mccheb.f dqgp.f a general-purpose quadrature routine for use in dmcdis.f or in dmcheb.f mccheb.f a subroutine implementing the discretized modified Chebyshev algorithm whereby modified moments are approximated by discrete modified moments dmcheb.f a double-precision version of mccheb.f chri.f a subroutine for computing the recursion coefficients of polynomials orthogonal with respect to a weight function obtained by a linear or quadratic modification of a given weight function dchri.f a double-precision version of chri.f knum.f a subroutine which applies a backward recurrence algorithm to generate weighted integrals of orthogonal polynomials multiplied by a Cauchy kernel nu0jac.f auxiliary routines providing an estimate for the starting nu0lag.f index in the backward recurrence algorithm of knum.f for nu0her.f respectively the Jacobi, Laguerre and Hermite weights dknum.f a double-precision version of knum.f kern.f a subroutine generating the kernels in the remainder term of Gauss quadrature rules applied to analytic functions dkern.f a double-precision version of kern.f gchri.f an alternative subroutine (to chri.f) for computing the recursion coefficients of polynomials orthogonal with with respect to a weight function obtained by dividing a given weight function by a linear or quadratic factor dgchri.f a double-precision version of gchri.f gauss.f a subroutine generating Gauss quadrature rules relative to a given integration measure dgauss.f a double-precision version of gauss.f radau.f a subroutine generating Gauss-Radau quadrature rules relative to a given integration measure dradau.f a double-precision version of radau.f lob.f a subroutine generating Gauss-Lobatto quadrature rules relative to a given integration measure dlob.f a double-precision version of lob.f C-END-OF-FILE cat < Makefile ####################################################################### # # # Makefile for ORTHPOL # # # # Usage: # # # # Type make to compile and run all test programs # # Type make testN.out.local to compile and run the test program # # number N # # Type make clean to remove all but the generated output # # # ####################################################################### #---------------------------------------------------------------------- # This section specifies the name of the linker and compilation options # for various systems. All but one are commented out. #---------------------------------------------------------------------- # ... For the Sun LD = f77 FFLAGS = #Do not use -O2; it may introduce errors # ... For the Cray #LD = cf77 #FFLAGS = # ... For the Convex #LD = fc #FFLAGS = -O2 # ... For the RS/6000 #LD = xlf #FFLAGS = -O # ... For the HP 9000 series #LD = f77 #FFLAGS = -O -K -w # ... For Silicon Graphics #LD = f77 #FFLAGS = -O2 #------------------------------------------------------------------- # This section specifies which object files are needed for each test # program. #------------------------------------------------------------------- TEST1 = test1.o r1mach.o d1mach.o recur.o drecur.o cheb.o dcheb.o TEST2 = test2.o r1mach.o d1mach.o recur.o drecur.o cheb.o dcheb.o TEST3 = test3.o r1mach.o sti.o lancz.o TEST4 = test4.o r1mach.o mcdis.o qgp.o sti.o lancz.o recur.o gauss.o TEST5 = test5.o r1mach.o d1mach.o recur.o drecur.o mcdis.o qgp.o sti.o lancz.o gauss.o TEST6 = test6.o r1mach.o d1mach.o mcdis.o dmcdis.o qgp.o dqgp.o sti.o dsti.o lancz.o dlancz.o recur.o drecur.o gauss.o dgauss.o TEST7 = test7.o r1mach.o d1mach.o mcdis.o dmcdis.o qgp.o dqgp.o sti.o dsti.o lancz.o dlancz.o TEST8 = test8.o r1mach.o recur.o mccheb.o qgp.o cheb.o TEST9 = test9.o r1mach.o d1mach.o recur.o drecur.o cheb.o dcheb.o chri.o dchri.o TEST10= test10.o r1mach.o d1mach.o recur.o drecur.o gauss.o dgauss.o chri.o dchri.o TEST11= test11.o r1mach.o d1mach.o recur.o drecur.o knum.o nu0jac.o dknum.o gchri.o dgchri.o cheb.o dcheb.o chri.o dchri.o #-------------------------------------------------------------- # This is the default target. It will cause all the tests to be # generated and run, saving their outputs in files. #-------------------------------------------------------------- all : test1.out.local test2.out.local test3.out.local test4.out.local test5.out.local test6.out.local test7.out.local test8.out.local test9.out.local test10.out.local test11.out.local #---------------------------------------------------------------------- # This section shows how to run each test program. The output for testN # is put in testN.out.local. #---------------------------------------------------------------------- test1.out.local : test1 ; test1 > \$@ test2.out.local : test2 ; test2 > \$@ test3.out.local : test3 ; test3 > \$@ test4.out.local : test4 ; test4 > \$@ test5.out.local : test5 ; test5 > \$@ test6.out.local : test6 ; test6 > \$@ test7.out.local : test7 ; test7 > \$@ test8.out.local : test8 ; test8 > \$@ test9.out.local : test9 ; test9 > \$@ test10.out.local : test10 ; test10 > \$@ test11.out.local : test11 ; test11 > \$@ #-------------------------------------------------- # This section shows how to link each test program. #-------------------------------------------------- test1 : $(TEST1) ; $(LD) -o \$@ $(TEST1) test2 : $(TEST2) ; $(LD) -o \$@ $(TEST2) test3 : $(TEST3) ; $(LD) -o \$@ $(TEST3) test4 : $(TEST4) ; $(LD) -o \$@ $(TEST4) test5 : $(TEST5) ; $(LD) -o \$@ $(TEST5) test6 : $(TEST6) ; $(LD) -o \$@ $(TEST6) test7 : $(TEST7) ; $(LD) -o \$@ $(TEST7) test8 : $(TEST8) ; $(LD) -o \$@ $(TEST8) test9 : $(TEST9) ; $(LD) -o \$@ $(TEST9) test10 : $(TEST10) ; $(LD) -o \$@ $(TEST10) test11 : $(TEST11) ; $(LD) -o \$@ $(TEST11) #---------------------------------------------- # This section shows how to clean up afterward. #---------------------------------------------- clean : rm -f core test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 *.o C-END-OF-FILE ######################### # # # 0. MACHINE CONSTANTS # # # ######################### cat < r1mach.f c c real function r1mach(i) c c Single-precision machine constants c c r1mach(1) = b**(emin-1), the smallest positive magnitude. c c r1mach(2) = b**emax*(1 - b**(-t)), the largest magnitude. c c r1mach(3) = b**(-t), the smallest relative spacing. c c r1mach(4) = b**(1-t), the largest relative spacing. c c r1mach(5) = log10(b) c c To alter this function for a particular environment, c the desired set of data statements should be activated by c removing the c from column 1. c On rare machines a static statement may need to be added. c (But probably more systems prohibit it than require it.) c c For IEEE-arithmetic machines (binary standard), the second c set of constants below should be appropriate. c c Where possible, decimal, octal or hexadecimal constants are used c to specify the constants exactly. Sometimes this requires using c equivalent integer arrays. If your compiler uses half-word c integers by default (sometimes called integer*2), you may need to c change integer to integer*4 or otherwise instruct your compiler c to use full-word integers in the next 5 declarations. c integer small(2) integer large(2) integer right(2) integer diver(2) integer log10(2) integer sc c real rmach(5) c equivalence (rmach(1),small(1)) equivalence (rmach(2),large(1)) equivalence (rmach(3),right(1)) equivalence (rmach(4),diver(1)) equivalence (rmach(5),log10(1)) c c machine constants for cdc cyber 205 and eta-10. c data small(1) / x'9000400000000000' / data large(1) / x'6FFF7FFFFFFFFFFF' / data right(1) / x'FFA3400000000000' / data diver(1) / x'FFA4400000000000' / data log10(1) / x'FFD04D104D427DE8' /, sc/987/ c c machine constants for ieee arithmetic machines, such as the at&t c 3b series, motorola 68000 based machines (e.g. sun 3 and at&t c pc 7300), and 8087 based micros (e.g. ibm pc and at&t 6300). c c data small(1) / 8388608 / c data large(1) / 2139095039 / c data right(1) / 864026624 / c data diver(1) / 872415232 / c data log10(1) / 1050288283 /, sc/987/ c c machine constants for amdahl machines. c c data small(1) / 1048576 / c data large(1) / 2147483647 / c data right(1) / 990904320 / c data diver(1) / 1007681536 / c data log10(1) / 1091781651 /, sc/987/ c c machine constants for the burroughs 1700 system. c c data rmach(1) / z400800000 / c data rmach(2) / z5ffffffff / c data rmach(3) / z4e9800000 / c data rmach(4) / z4ea800000 / c data rmach(5) / z500e730e8 /, sc/987/ c c machine constants for the burroughs 5700/6700/7700 systems. c c data rmach(1) / o1771000000000000 / c data rmach(2) / o0777777777777777 / c data rmach(3) / o1311000000000000 / c data rmach(4) / o1301000000000000 / c data rmach(5) / o1157163034761675 /, sc/987/ c c machine constants for ftn4 on the cdc 6000/7000 series. c c data rmach(1) / 00564000000000000000b / c data rmach(2) / 37767777777777777776b / c data rmach(3) / 16414000000000000000b / c data rmach(4) / 16424000000000000000b / c data rmach(5) / 17164642023241175720b /, sc/987/ c c machine constants for ftn5 on the cdc 6000/7000 series. c c data rmach(1) / o"00564000000000000000" / c data rmach(2) / o"37767777777777777776" / c data rmach(3) / o"16414000000000000000" / c data rmach(4) / o"16424000000000000000" / c data rmach(5) / o"17164642023241175720" /, sc/987/ c c machine constants for convex c-1. c c data rmach(1) / '00800000'x / c data rmach(2) / '7fffffff'x / c data rmach(3) / '34800000'x / c data rmach(4) / '35000000'x / c data rmach(5) / '3f9a209b'x /, sc/987/ c c machine constants for the cray 1, xmp, 2, and 3. c c data rmach(1) / 200034000000000000000b / c data rmach(2) / 577767777777777777776b / c data rmach(3) / 377224000000000000000b / c data rmach(4) / 377234000000000000000b / c data rmach(5) / 377774642023241175720b /, sc/987/ c c machine constants for the data general eclipse s/200. c c note - it may be appropriate to include the following line - c static rmach(5) c c data small/20k,0/,large/77777k,177777k/ c data right/35420k,0/,diver/36020k,0/ c data log10/40423k,42023k/, sc/987/ c c machine constants for the harris slash 6 and slash 7. c c data small(1),small(2) / '20000000, '00000201 / c data large(1),large(2) / '37777777, '00000177 / c data right(1),right(2) / '20000000, '00000352 / c data diver(1),diver(2) / '20000000, '00000353 / c data log10(1),log10(2) / '23210115, '00000377 /, sc/987/ c c machine constants for the honeywell dps 8/70 series. c c data rmach(1) / o402400000000 / c data rmach(2) / o376777777777 / c data rmach(3) / o714400000000 / c data rmach(4) / o716400000000 / c data rmach(5) / o776464202324 /, sc/987/ c c machine constants for the ibm 360/370 series, c the xerox sigma 5/7/9 and the sel systems 85/86. c c data rmach(1) / z00100000 / c data rmach(2) / z7fffffff / c data rmach(3) / z3b100000 / c data rmach(4) / z3c100000 / c data rmach(5) / z41134413 /, sc/987/ c c machine constants for the interdata 8/32 c with the unix system fortran 77 compiler. c c for the interdata fortran vii compiler replace c the z's specifying hex constants with y's. c c data rmach(1) / z'00100000' / c data rmach(2) / z'7effffff' / c data rmach(3) / z'3b100000' / c data rmach(4) / z'3c100000' / c data rmach(5) / z'41134413' /, sc/987/ c c machine constants for the pdp-10 (ka or ki processor). c c data rmach(1) / "000400000000 / c data rmach(2) / "377777777777 / c data rmach(3) / "146400000000 / c data rmach(4) / "147400000000 / c data rmach(5) / "177464202324 /, sc/987/ c c machine constants for pdp-11 fortrans supporting c 32-bit integers (expressed in integer and octal). c c data small(1) / 8388608 / c data large(1) / 2147483647 / c data right(1) / 880803840 / c data diver(1) / 889192448 / c data log10(1) / 1067065499 /, sc/987/ c c data rmach(1) / o00040000000 / c data rmach(2) / o17777777777 / c data rmach(3) / o06440000000 / c data rmach(4) / o06500000000 / c data rmach(5) / o07746420233 /, sc/987/ c c machine constants for pdp-11 fortrans supporting c 16-bit integers (expressed in integer and octal). c c data small(1),small(2) / 128, 0 / c data large(1),large(2) / 32767, -1 / c data right(1),right(2) / 13440, 0 / c data diver(1),diver(2) / 13568, 0 / c data log10(1),log10(2) / 16282, 8347 /, sc/987/ c c data small(1),small(2) / o000200, o000000 / c data large(1),large(2) / o077777, o177777 / c data right(1),right(2) / o032200, o000000 / c data diver(1),diver(2) / o032400, o000000 / c data log10(1),log10(2) / o037632, o020233 /, sc/987/ c c machine constants for the sequent balance 8000. c c data small(1) / $00800000 / c data large(1) / $7f7fffff / c data right(1) / $33800000 / c data diver(1) / $34000000 / c data log10(1) / $3e9a209b /, sc/987/ c c machine constants for the univac 1100 series. c c data rmach(1) / o000400000000 / c data rmach(2) / o377777777777 / c data rmach(3) / o146400000000 / c data rmach(4) / o147400000000 / c data rmach(5) / o177464202324 /, sc/987/ c c machine constants for the vax unix f77 compiler. c c data small(1) / 128 / c data large(1) / -32769 / c data right(1) / 13440 / c data diver(1) / 13568 / c data log10(1) / 547045274 /, sc/987/ c c machine constants for the vax-11 with c fortran iv-plus compiler. c c data rmach(1) / z00000080 / c data rmach(2) / zffff7fff / c data rmach(3) / z00003480 / c data rmach(4) / z00003500 / c data rmach(5) / z209b3f9a /, sc/987/ c c machine constants for vax/vms version 2.2. c c data rmach(1) / '80'x / c data rmach(2) / 'ffff7fff'x / c data rmach(3) / '3480'x / c data rmach(4) / '3500'x / c data rmach(5) / '209b3f9a'x /, sc/987/ c c *** issue stop 778 if all data statements are commented... if (sc .ne. 987) stop 778 if (i .lt. 1 .or. i .gt. 5) goto 999 r1mach = rmach(i) return 999 write(*,1999) i 1999 format(' r1mach - i out of bounds',i10) stop end C-END-OF-FILE cat < d1mach.f c c double precision function d1mach(i) c c Double-precision machine constants c c d1mach( 1) = b**(emin-1), the smallest positive magnitude. c c d1mach( 2) = b**emax*(1 - b**(-t)), the largest magnitude. c c d1mach( 3) = b**(-t), the smallest relative spacing. c c d1mach( 4) = b**(1-t), the largest relative spacing. c c d1mach( 5) = log10(b) c c To alter this function for a particular environment, c the desired set of data statements should be activated by c removing the c from column 1. c On rare machines a static statement may need to be added. c (But probably more systems prohibit it than require it.) c c For IEEE-arithmetic machines (binary standard), one of the second c two sets of constants below should be appropriate. c c Where possible, decimal, octal or hexadecimal constants are used c to specify the constants exactly. Sometimes this requires using c equivalent integer arrays. If your compiler uses half-word c integers by default (sometimes called integer*2), you may need to c change integer to integer*4 or otherwise instruct your compiler c to use full-word integers in the next 5 declarations. c integer small(2) integer large(2) integer right(2) integer diver(2) integer log10(2) integer sc c double precision dmach(5) c equivalence (dmach(1),small(1)) equivalence (dmach(2),large(1)) equivalence (dmach(3),right(1)) equivalence (dmach(4),diver(1)) equivalence (dmach(5),log10(1)) c c machine constants for cdc cyber 205 and eta-10. c data small(1) / x'9000400000000000' / data small(2) / x'8000000000000000' / data large(1) / x'6FFF7FFFFFFFFFFF' / data large(2) / x'6FD07FFFFFFFFFFF' / data right(1) / x'FF74400000000000' / data right(2) / x'8000000000000000' / data diver(1) / x'FF75400000000000' / data diver(2) / x'8000000000000000' / data log10(1) / x'FFD04D104D427DE7' / data log10(2) / x'FFA17DE623E2566B' /, sc/987/ c c machine constants for ieee arithmetic machines, such as the at&t c 3b series and motorola 68000 based machines (e.g. sun 3 and at&t c pc 7300), in which the most significant byte is stored first. c c data small(1),small(2) / 1048576, 0 / c data large(1),large(2) / 2146435071, -1 / c data right(1),right(2) / 1017118720, 0 / c data diver(1),diver(2) / 1018167296, 0 / c data log10(1),log10(2) / 1070810131, 1352628735 /, sc/987/ c c machine constants for ieee arithmetic machines and 8087-based c micros, such as the ibm pc and at&t 6300, in which the least c significant byte is stored first. c c data small(1),small(2) / 0, 1048576 / c data large(1),large(2) / -1, 2146435071 / c data right(1),right(2) / 0, 1017118720 / c data diver(1),diver(2) / 0, 1018167296 / c data log10(1),log10(2) / 1352628735, 1070810131 /, sc/987/ c c machine constants for amdahl machines. c c data small(1),small(2) / 1048576, 0 / c data large(1),large(2) / 2147483647, -1 / c data right(1),right(2) / 856686592, 0 / c data diver(1),diver(2) / 873463808, 0 / c data log10(1),log10(2) / 1091781651, 1352628735 /, sc/987/ c c machine constants for the burroughs 1700 system. c c data small(1) / zc00800000 / c data small(2) / z000000000 / c c data large(1) / zdffffffff / c data large(2) / zfffffffff / c c data right(1) / zcc5800000 / c data right(2) / z000000000 / c c data diver(1) / zcc6800000 / c data diver(2) / z000000000 / c c data log10(1) / zd00e730e7 / c data log10(2) / zc77800dc0 /, sc/987/ c c machine constants for the burroughs 5700 system. c c data small(1) / o1771000000000000 / c data small(2) / o0000000000000000 / c c data large(1) / o0777777777777777 / c data large(2) / o0007777777777777 / c c data right(1) / o1461000000000000 / c data right(2) / o0000000000000000 / c c data diver(1) / o1451000000000000 / c data diver(2) / o0000000000000000 / c c data log10(1) / o1157163034761674 / c data log10(2) / o0006677466732724 /, sc/987/ c c machine constants for the burroughs 6700/7700 systems. c c data small(1) / o1771000000000000 / c data small(2) / o7770000000000000 / c c data large(1) / o0777777777777777 / c data large(2) / o7777777777777777 / c c data right(1) / o1461000000000000 / c data right(2) / o0000000000000000 / c c data diver(1) / o1451000000000000 / c data diver(2) / o0000000000000000 / c c data log10(1) / o1157163034761674 / c data log10(2) / o0006677466732724 /, sc/987/ c c machine constants for ftn4 on the cdc 6000/7000 series. c c data small(1) / 00564000000000000000b / c data small(2) / 00000000000000000000b / c c data large(1) / 37757777777777777777b / c data large(2) / 37157777777777777774b / c c data right(1) / 15624000000000000000b / c data right(2) / 00000000000000000000b / c c data diver(1) / 15634000000000000000b / c data diver(2) / 00000000000000000000b / c c data log10(1) / 17164642023241175717b / c data log10(2) / 16367571421742254654b /, sc/987/ c c machine constants for ftn5 on the cdc 6000/7000 series. c c data small(1) / o"00564000000000000000" / c data small(2) / o"00000000000000000000" / c c data large(1) / o"37757777777777777777" / c data large(2) / o"37157777777777777774" / c c data right(1) / o"15624000000000000000" / c data right(2) / o"00000000000000000000" / c c data diver(1) / o"15634000000000000000" / c data diver(2) / o"00000000000000000000" / c c data log10(1) / o"17164642023241175717" / c data log10(2) / o"16367571421742254654" /, sc/987/ c c machine constants for convex c-1 c c data small(1),small(2) / '00100000'x, '00000000'x / c data large(1),large(2) / '7fffffff'x, 'ffffffff'x / c data right(1),right(2) / '3cc00000'x, '00000000'x / c data diver(1),diver(2) / '3cd00000'x, '00000000'x / c data log10(1),log10(2) / '3ff34413'x, '509f79ff'x /, sc/987/ c c machine constants for the cray 1, xmp, 2, and 3. c c data small(1) / 201354000000000000000b / c data small(2) / 000000000000000000000b / c c data large(1) / 577767777777777777777b / c data large(2) / 000007777777777777776b / c c data right(1) / 376434000000000000000b / c data right(2) / 000000000000000000000b / c c data diver(1) / 376444000000000000000b / c data diver(2) / 000000000000000000000b / c c data log10(1) / 377774642023241175717b / c data log10(2) / 000007571421742254654b /, sc/987/ c c machine constants for the data general eclipse s/200 c c small, large, right, diver, log10 should be declared c integer small(4), large(4), right(4), diver(4), log10(4) c c note - it may be appropriate to include the following line - c static dmach(5) c c data small/20k,3*0/,large/77777k,3*177777k/ c data right/31420k,3*0/,diver/32020k,3*0/ c data log10/40423k,42023k,50237k,74776k/, sc/987/ c c machine constants for the harris slash 6 and slash 7 c c data small(1),small(2) / '20000000, '00000201 / c data large(1),large(2) / '37777777, '37777577 / c data right(1),right(2) / '20000000, '00000333 / c data diver(1),diver(2) / '20000000, '00000334 / c data log10(1),log10(2) / '23210115, '10237777 /, sc/987/ c c machine constants for the honeywell dps 8/70 series. c c data small(1),small(2) / o402400000000, o000000000000 / c data large(1),large(2) / o376777777777, o777777777777 / c data right(1),right(2) / o604400000000, o000000000000 / c data diver(1),diver(2) / o606400000000, o000000000000 / c data log10(1),log10(2) / o776464202324, o117571775714 /, sc/987/ c c machine constants for the ibm 360/370 series, c the xerox sigma 5/7/9 and the sel systems 85/86. c c data small(1),small(2) / z00100000, z00000000 / c data large(1),large(2) / z7fffffff, zffffffff / c data right(1),right(2) / z33100000, z00000000 / c data diver(1),diver(2) / z34100000, z00000000 / c data log10(1),log10(2) / z41134413, z509f79ff /, sc/987/ c c machine constants for the interdata 8/32 c with the unix system fortran 77 compiler. c c for the interdata fortran vii compiler replace c the z's specifying hex constants with y's. c c data small(1),small(2) / z'00100000', z'00000000' / c data large(1),large(2) / z'7effffff', z'ffffffff' / c data right(1),right(2) / z'33100000', z'00000000' / c data diver(1),diver(2) / z'34100000', z'00000000' / c data log10(1),log10(2) / z'41134413', z'509f79ff' /, sc/987/ c c machine constants for the pdp-10 (ka processor). c c data small(1),small(2) / "033400000000, "000000000000 / c data large(1),large(2) / "377777777777, "344777777777 / c data right(1),right(2) / "113400000000, "000000000000 / c data diver(1),diver(2) / "114400000000, "000000000000 / c data log10(1),log10(2) / "177464202324, "144117571776 /, sc/987/ c c machine constants for the pdp-10 (ki processor). c c data small(1),small(2) / "000400000000, "000000000000 / c data large(1),large(2) / "377777777777, "377777777777 / c data right(1),right(2) / "103400000000, "000000000000 / c data diver(1),diver(2) / "104400000000, "000000000000 / c data log10(1),log10(2) / "177464202324, "047674776746 /, sc/987/ c c machine constants for pdp-11 fortrans supporting c 32-bit integers (expressed in integer and octal). c c data small(1),small(2) / 8388608, 0 / c data large(1),large(2) / 2147483647, -1 / c data right(1),right(2) / 612368384, 0 / c data diver(1),diver(2) / 620756992, 0 / c data log10(1),log10(2) / 1067065498, -2063872008 /, sc/987/ c c data small(1),small(2) / o00040000000, o00000000000 / c data large(1),large(2) / o17777777777, o37777777777 / c data right(1),right(2) / o04440000000, o00000000000 / c data diver(1),diver(2) / o04500000000, o00000000000 / c data log10(1),log10(2) / o07746420232, o20476747770 /, sc/987/ c c machine constants for pdp-11 fortrans supporting c 16-bit integers (expressed in integer and octal). c c small, large, right, diver, log10 should be declared c integer small(4), large(4), right(4), diver(4), log10(4) c c data small(1),small(2) / 128, 0 / c data small(3),small(4) / 0, 0 / c c data large(1),large(2) / 32767, -1 / c data large(3),large(4) / -1, -1 / c c data right(1),right(2) / 9344, 0 / c data right(3),right(4) / 0, 0 / c c data diver(1),diver(2) / 9472, 0 / c data diver(3),diver(4) / 0, 0 / c c data log10(1),log10(2) / 16282, 8346 / c data log10(3),log10(4) / -31493, -12296 /, sc/987/ c c data small(1),small(2) / o000200, o000000 / c data small(3),small(4) / o000000, o000000 / c c data large(1),large(2) / o077777, o177777 / c data large(3),large(4) / o177777, o177777 / c c data right(1),right(2) / o022200, o000000 / c data right(3),right(4) / o000000, o000000 / c c data diver(1),diver(2) / o022400, o000000 / c data diver(3),diver(4) / o000000, o000000 / c c data log10(1),log10(2) / o037632, o020232 / c data log10(3),log10(4) / o102373, o147770 /, sc/987/ c c machine constants for the prime 50 series systems c with 32-bit integers and 64v mode instructions, c supplied by igor bray. c c data small(1),small(2) / :10000000000, :00000100001 / c data large(1),large(2) / :17777777777, :37777677775 / c data right(1),right(2) / :10000000000, :00000000122 / c data diver(1),diver(2) / :10000000000, :00000000123 / c data log10(1),log10(2) / :11504046501, :07674600177 /, sc/987/ c c machine constants for the sequent balance 8000 c c data small(1),small(2) / $00000000, $00100000 / c data large(1),large(2) / $ffffffff, $7fefffff / c data right(1),right(2) / $00000000, $3ca00000 / c data diver(1),diver(2) / $00000000, $3cb00000 / c data log10(1),log10(2) / $509f79ff, $3fd34413 /, sc/987/ c c machine constants for the univac 1100 series. c c data small(1),small(2) / o000040000000, o000000000000 / c data large(1),large(2) / o377777777777, o777777777777 / c data right(1),right(2) / o170540000000, o000000000000 / c data diver(1),diver(2) / o170640000000, o000000000000 / c data log10(1),log10(2) / o177746420232, o411757177572 /, sc/987/ c c machine constants for the vax unix f77 compiler c c data small(1),small(2) / 128, 0 / c data large(1),large(2) / -32769, -1 / c data right(1),right(2) / 9344, 0 / c data diver(1),diver(2) / 9472, 0 / c data log10(1),log10(2) / 546979738, -805796613 /, sc/987/ c c machine constants for the vax-11 with c fortran iv-plus compiler c c data small(1),small(2) / z00000080, z00000000 / c data large(1),large(2) / zffff7fff, zffffffff / c data right(1),right(2) / z00002480, z00000000 / c data diver(1),diver(2) / z00002500, z00000000 / c data log10(1),log10(2) / z209a3f9a, zcff884fb /, sc/987/ c c machine constants for vax/vms version 2.2 c c data small(1),small(2) / '80'x, '0'x / c data large(1),large(2) / 'ffff7fff'x, 'ffffffff'x / c data right(1),right(2) / '2480'x, '0'x / c data diver(1),diver(2) / '2500'x, '0'x / c data log10(1),log10(2) / '209a3f9a'x, 'cff884fb'x /, sc/987/ c c *** issue stop 779 if all data statements are commented... if (sc .ne. 987) stop 779 c *** issue stop 778 if all data statements are obviously wrong... if (dmach(4) .ge. 1.0d0) stop 778 if (i .lt. 1 .or. i .gt. 5) goto 999 d1mach = dmach(i) return 999 write(*,1999) i 1999 format(' d1mach - i out of bounds',i10) stop end C-END-OF-FILE ############# # # # 1. TESTS # # # ############# cat < test1.f c c program test1 c c dimension fnu(160),f(80),f0(80),rr(80),a(159),b(159), *alpha(80),beta(80),s(80),s0(160),s1(160),s2(160) double precision doom2(7),deps,d1mach,dom2,dnu(160),d(80), *d0(80),drr(80),da(159),db(159),dalpha(80),dbeta(80),ds(80), *ds0(160),ds1(160),ds2(160) logical modmom data doom2/.1d0,.3d0,.5d0,.7d0,.9d0,.99d0,.999d0/ c c This test generates the first n beta-coefficients in the recurrence c relation for the orthogonal polynomials relative to the weight c function c c ((1-om2*x**2)*(1-x**2))**(-1/2) on (-1,1) c c for om2=.1(.2).9,.99,.999, both in single and double precision, c using modified moments if modmom=.true. and ordinary moments c otherwise. In the former case, n=80, in the latter, n=20. Printed c are the double-precision values of the coefficients along with the c relative errors of the single-precision values. c write(*,1) 1 format(/) modmom=.true. eps=r1mach(3) deps=d1mach(3) if(modmom) then n=80 else n=20 end if ndm1=2*n-1 do 30 iom=1,7 dom2=doom2(iom) om2=sngl(dom2) c c Compute the modified resp. ordinary moments using Eqs. (3.7) and (3.9) c of the companion paper. On machines with limited exponent range, some c of the high-order modified moments may underflow, without this having c any deteriorating effect on the accuracy. c call fmm(n,eps,modmom,om2,fnu,ierr,f,f0,rr) call dmm(n,deps,modmom,dom2,dnu,iderr,d,d0,drr) if(ierr.ne.0 .or. iderr.ne.0) then write(*,2) ierr,iderr,om2 2 format(/5x,'ierr in fmm = ',i1,' iderr in dmm = ',i1, * ' for om2 = ',f8.4/) goto 30 end if c c Generate the recursion coefficients for the polynomials defining the c modified resp. ordinary moments. c if(modmom) then call recur(ndm1,3,0.,0.,a,b,ierr) call drecur(ndm1,3,0.d0,0.d0,da,db,iderr) else do 10 k=1,ndm1 a(k)=0. b(k)=0. da(k)=0.d0 db(k)=0.d0 10 continue end if c c Compute the desired recursion coefficients by means of the modified c Chebyshev algorithm; for the latter, see, e.g., Section 2.4 of c W. Gautschi, ``On generating orthogonal polynomials'', SIAM J. Sci. c Statist. Comput. 3, 1982, 289-317. c call cheb(n,a,b,fnu,alpha,beta,s,ierr,s0,s1,s2) c c On machines with limited single-precision exponent range, the routine c cheb may generate an underflow exception, which however is harmless c and can be ignored. c call dcheb(n,da,db,dnu,dalpha,dbeta,ds,iderr,ds0,ds1,ds2) write(*,3) ierr,iderr 3 format(/5x,'ierr in cheb = ',i3,' iderr in dcheb = ',i3/) write(*,4) 4 format(/5x,'k',14x,'dbeta(k)'/) do 20 k=1,n km1=k-1 if(iderr.eq.0 .or. km1.lt.abs(iderr)) then if(ierr.eq.0 .or. km1.lt.abs(ierr)) then errb=sngl(dabs(dble(beta(k))-dbeta(k))/dbeta(k)) if(k.eq.1) then write(*,5) km1,dbeta(k),errb,om2 5 format(1x,i5,d36.28,e12.4,' om2 =',f6.3) else write(*,6) km1,dbeta(k),errb 6 format(1x,i5,d36.28,e12.4) end if else write(*,7) km1,dbeta(k) 7 format(1x,i5,d36.28) end if end if 20 continue write(*,1) 30 continue stop end subroutine fmm(n,eps,modmom,om2,fnu,ierr,f,f0,rr) c c This routine generates the modified (Chebyshev) resp. ordinary c moments of the weight function c c ((1-om2*x**2)*(1-x**2))**(-1/2) on (-1,1) c c using Eqs. (3.7) resp. (3.9) of the companion paper. c dimension fnu(*),f(n),f0(n),rr(n) logical modmom c c The array fnu is assumed to have dimension 2*n. c ierr=0 nd=2*n ndm1=nd-1 pi=4.*atan(1.) c c Compute the Fourier coefficients of ((1-om2*sin(theta)**2))**(-1/2) c as minimal solution of a three-term recurrence relation as described c on pp.310-311 of W. Gautschi,``On generating orthogonal polynomials'', c SIAM J. Sci. Statist. Comput. 3, 1982, 289-317. c q=om2/(2.-om2+2.*sqrt(1.-om2)) q1=(1.+q*q)/q do 10 k=1,n f(k)=0. 10 continue nu=nd 20 nu=nu+10 do 30 k=1,n f0(k)=f(k) 30 continue if(nu.gt.500) then ierr=1 return end if r=0. s=0. do 40 k=1,nu n1=nu-k+1 fn1=real(n1) r=-(fn1-.5)/(fn1*q1+(fn1+.5)*r) s=r*(2.+s) if(n1.le.n) rr(n1)=r 40 continue c0=1./(1.+s) f(1)=rr(1)*c0 if(n.gt.1) then do 50 k=2,n f(k)=rr(k)*f(k-1) 50 continue end if do 60 k=1,n if(abs(f(k)-f0(k)).gt.eps*abs(f(k))) goto 20 60 continue c c Compute the desired modified resp. ordinary moments in term of c the above Fourier coefficients. c fnu(1)=pi*c0 if(n.eq.1) return fnu(2)=0. if(n.eq.2) return if(modmom) then c=2.*pi do 70 k=3,ndm1,2 k1=(k-1)/2 c=-.25*c fnu(k)=c*f(k1) fnu(k+1)=0. 70 continue else c=.5*pi fnu(3)=c*(c0-f(1)) fnu(4)=0. c=-c do 90 k=5,ndm1,2 k1=(k-1)/2 k1m1=k1-1 c=-.25*c c1=1. sum=f(k1) do 80 i=1,k1m1 c1=-c1*real(2*k1-i+1)/real(i) sum=sum+c1*f(k1-i) 80 continue c1=-c1*real(k1+1)/real(2*k1) sum=sum+c1*c0 fnu(k)=c*sum fnu(k+1)=0. 90 continue end if end subroutine dmm(n,deps,modmom,dom2,dnu,ierrd,d,d0,drr) c c This is a double-precision version of the routine fmm. c double precision deps,dom2,dnu(*),d(n),d0(n),drr(n),dpi,dq, *dq1,dr,ds,dn1,dc0,dc,dc1,dsum logical modmom c c The array dnu is assumed to have dimension 2*n. c ierrd=0 nd=2*n ndm1=nd-1 dpi=4.d0*datan(1.d0) dq=dom2/(2.d0-dom2+2.d0*dsqrt(1.d0-dom2)) dq1=(1.d0+dq*dq)/dq do 10 k=1,n d(k)=0.d0 10 continue nud=nd 20 nud=nud+10 do 30 k=1,n d0(k)=d(k) 30 continue if(nud.gt.1000) then ierrd=1 return end if dr=0.d0 ds=0.d0 do 40 k=1,nud n1=nud-k+1 dn1=dble(n1) dr=-(dn1-.5d0)/(dn1*dq1+(dn1+.5d0)*dr) ds=dr*(2.d0+ds) if(n1.le.n) drr(n1)=dr 40 continue dc0=1.d0/(1.d0+ds) d(1)=drr(1)*dc0 if(n.gt.1) then do 50 k=2,n d(k)=drr(k)*d(k-1) 50 continue end if do 60 k=1,n if(dabs(d(k)-d0(k)).gt.deps*dabs(d(k))) goto 20 60 continue dnu(1)=dpi*dc0 if(n.eq.1) return dnu(2)=0.d0 if(n.eq.2) return if(modmom) then dc=2.d0*dpi do 70 k=3,ndm1,2 k1=(k-1)/2 dc=-.25d0*dc dnu(k)=dc*d(k1) dnu(k+1)=0.d0 70 continue else dc=.5d0*dpi dnu(3)=dc*(dc0-d(1)) dnu(4)=0.d0 dc=-dc do 90 k=5,ndm1,2 k1=(k-1)/2 k1m1=k1-1 dc=-.25d0*dc dc1=1.d0 dsum=d(k1) do 80 i=1,k1m1 dc1=-dc1*dble(2*k1-i+1)/dble(i) dsum=dsum+dc1*d(k1-i) 80 continue dc1=-dc1*dble(k1+1)/dble(2*k1) dsum=dsum+dc1*dc0 dnu(k)=dc*dsum dnu(k+1)=0.d0 90 continue end if end C-END-OF-FILE cat < test1.out output of test1 with modmom=.true.: IERR IN CHEB = 0 IDERR IN DCHEB = 0 K DBETA(K) 0 0.3224882697440438796459832725D+01 0.1433E-13 OM2 = 0.100 1 0.5065840806382684475158495727D+00 0.1187E-13 2 0.2467293493188785576130435953D+00 0.9371E-14 3 0.2499786103248681596536302010D+00 0.5923E-14 4 0.2499997192892932646699795011D+00 0.5105E-14 5 0.2499999953890031901881028267D+00 0.1109E-13 6 0.2499999999151142217232291027D+00 0.1105E-13 7 0.2499999999983250486706790196D+00 0.2193E-13 8 0.2499999999999653681699452575D+00 0.3581E-14 9 0.2499999999999992594133250895D+00 0.1125E-13 10 0.2499999999999999837550002295D+00 0.6498E-16 11 0.2499999999999999996365048540D+00 0.1454E-17 12 0.2499999999999999999917355164D+00 0.3306E-19 13 0.2499999999999999999998096161D+00 0.1421E-13 14 0.2499999999999999999999955659D+00 0.1774E-22 15 0.2499999999999999999999998957D+00 0.4170E-24 16 0.2499999999999999999999999975D+00 0.9996E-26 17 0.2499999999999999999999999999D+00 0.3029E-27 18 0.2500000000000000000000000000D+00 0.0000E+00 19 0.2499999999999999999999999999D+00 0.2019E-27 20 0.2500000000000000000000000000D+00 0.0000E+00 21 0.2500000000000000000000000000D+00 0.0000E+00 22 0.2500000000000000000000000000D+00 0.0000E+00 23 0.2500000000000000000000000000D+00 0.0000E+00 24 0.2500000000000000000000000000D+00 0.0000E+00 25 0.2500000000000000000000000000D+00 0.0000E+00 26 0.2500000000000000000000000000D+00 0.0000E+00 27 0.2500000000000000000000000000D+00 0.0000E+00 28 0.2500000000000000000000000000D+00 0.0000E+00 29 0.2500000000000000000000000000D+00 0.0000E+00 30 0.2500000000000000000000000000D+00 0.0000E+00 31 0.2500000000000000000000000000D+00 0.0000E+00 32 0.2500000000000000000000000000D+00 0.0000E+00 33 0.2500000000000000000000000000D+00 0.0000E+00 34 0.2500000000000000000000000000D+00 0.0000E+00 35 0.2500000000000000000000000000D+00 0.0000E+00 36 0.2500000000000000000000000000D+00 0.0000E+00 37 0.2500000000000000000000000000D+00 0.0000E+00 38 0.2500000000000000000000000000D+00 0.0000E+00 39 0.2500000000000000000000000000D+00 0.0000E+00 40 0.2500000000000000000000000000D+00 0.0000E+00 41 0.2500000000000000000000000000D+00 0.0000E+00 42 0.2500000000000000000000000000D+00 0.0000E+00 43 0.2500000000000000000000000000D+00 0.0000E+00 44 0.2500000000000000000000000000D+00 0.0000E+00 45 0.2500000000000000000000000000D+00 0.0000E+00 46 0.2500000000000000000000000000D+00 0.0000E+00 47 0.2500000000000000000000000000D+00 0.0000E+00 48 0.2500000000000000000000000000D+00 0.0000E+00 49 0.2500000000000000000000000000D+00 0.0000E+00 50 0.2500000000000000000000000000D+00 0.0000E+00 51 0.2500000000000000000000000000D+00 0.0000E+00 52 0.2500000000000000000000000000D+00 0.0000E+00 53 0.2500000000000000000000000000D+00 0.0000E+00 54 0.2500000000000000000000000000D+00 0.0000E+00 55 0.2500000000000000000000000000D+00 0.0000E+00 56 0.2500000000000000000000000000D+00 0.0000E+00 57 0.2500000000000000000000000000D+00 0.0000E+00 58 0.2500000000000000000000000000D+00 0.0000E+00 59 0.2500000000000000000000000000D+00 0.0000E+00 60 0.2500000000000000000000000000D+00 0.0000E+00 61 0.2500000000000000000000000000D+00 0.0000E+00 62 0.2500000000000000000000000000D+00 0.0000E+00 63 0.2500000000000000000000000000D+00 0.0000E+00 64 0.2500000000000000000000000000D+00 0.0000E+00 65 0.2500000000000000000000000000D+00 0.0000E+00 66 0.2500000000000000000000000000D+00 0.0000E+00 67 0.2500000000000000000000000000D+00 0.0000E+00 68 0.2500000000000000000000000000D+00 0.0000E+00 69 0.2500000000000000000000000000D+00 0.0000E+00 70 0.2500000000000000000000000000D+00 0.0000E+00 71 0.2500000000000000000000000000D+00 0.0000E+00 72 0.2500000000000000000000000000D+00 0.0000E+00 73 0.2500000000000000000000000000D+00 0.0000E+00 74 0.2500000000000000000000000000D+00 0.0000E+00 75 0.2500000000000000000000000000D+00 0.0000E+00 76 0.2500000000000000000000000000D+00 0.0000E+00 77 0.2500000000000000000000000000D+00 0.0000E+00 78 0.2500000000000000000000000000D+00 0.0000E+00 79 0.2500000000000000000000000000D+00 0.0000E+00 IERR IN CHEB = 0 IDERR IN DCHEB = 0 K DBETA(K) 0 0.3427778896357582124077869689D+01 0.8867E-14 OM2 = 0.300 1 0.5222553571575005169932901811D+00 0.5370E-14 2 0.2391089484344383143284396275D+00 0.1443E-13 3 0.2497633566075743756040256623D+00 0.1802E-13 4 0.2499895949326480950578823133D+00 0.6392E-14 5 0.2499994255652457252517512062D+00 0.1306E-13 6 0.2499999644019888681144230020D+00 0.9176E-14 7 0.2499999976333568222970480036D+00 0.2369E-14 8 0.2499999998350340290206394715D+00 0.1715E-13 9 0.2499999999881026637164417901D+00 0.2807E-14 10 0.2499999999991196293287261143D+00 0.2809E-14 11 0.2499999999999335336347728683D+00 0.4141E-14 12 0.2499999999999949003455424813D+00 0.8023E-14 13 0.2499999999999996035153188035D+00 0.1262E-13 14 0.2499999999999999688316822857D+00 0.1247E-15 15 0.2499999999999999975267288048D+00 0.9893E-17 16 0.2499999999999999998021544036D+00 0.7914E-18 17 0.2499999999999999999840626537D+00 0.6375E-19 18 0.2499999999999999999987082901D+00 0.5167E-20 19 0.2499999999999999999998947400D+00 0.4210E-21 20 0.2499999999999999999999913811D+00 0.3448E-22 21 0.2499999999999999999999992912D+00 0.2835E-23 22 0.2499999999999999999999999415D+00 0.1421E-13 23 0.2499999999999999999999999951D+00 0.1949E-25 24 0.2499999999999999999999999996D+00 0.1717E-26 25 0.2499999999999999999999999999D+00 0.3029E-27 26 0.2500000000000000000000000000D+00 0.0000E+00 27 0.2499999999999999999999999999D+00 0.2019E-27 28 0.2500000000000000000000000000D+00 0.0000E+00 29 0.2500000000000000000000000000D+00 0.0000E+00 30 0.2500000000000000000000000000D+00 0.0000E+00 31 0.2500000000000000000000000000D+00 0.0000E+00 32 0.2500000000000000000000000000D+00 0.0000E+00 33 0.2500000000000000000000000000D+00 0.0000E+00 34 0.2500000000000000000000000000D+00 0.0000E+00 35 0.2500000000000000000000000000D+00 0.0000E+00 36 0.2500000000000000000000000000D+00 0.0000E+00 37 0.2500000000000000000000000000D+00 0.0000E+00 38 0.2500000000000000000000000000D+00 0.0000E+00 39 0.2500000000000000000000000000D+00 0.0000E+00 40 0.2500000000000000000000000000D+00 0.0000E+00 41 0.2500000000000000000000000000D+00 0.0000E+00 42 0.2500000000000000000000000000D+00 0.0000E+00 43 0.2500000000000000000000000000D+00 0.0000E+00 44 0.2500000000000000000000000000D+00 0.0000E+00 45 0.2500000000000000000000000000D+00 0.0000E+00 46 0.2500000000000000000000000000D+00 0.0000E+00 47 0.2500000000000000000000000000D+00 0.0000E+00 48 0.2500000000000000000000000000D+00 0.0000E+00 49 0.2500000000000000000000000000D+00 0.0000E+00 50 0.2500000000000000000000000000D+00 0.0000E+00 51 0.2500000000000000000000000000D+00 0.0000E+00 52 0.2500000000000000000000000000D+00 0.0000E+00 53 0.2500000000000000000000000000D+00 0.0000E+00 54 0.2500000000000000000000000000D+00 0.0000E+00 55 0.2500000000000000000000000000D+00 0.0000E+00 56 0.2500000000000000000000000000D+00 0.0000E+00 57 0.2500000000000000000000000000D+00 0.0000E+00 58 0.2500000000000000000000000000D+00 0.0000E+00 59 0.2500000000000000000000000000D+00 0.0000E+00 60 0.2500000000000000000000000000D+00 0.0000E+00 61 0.2500000000000000000000000000D+00 0.0000E+00 62 0.2500000000000000000000000000D+00 0.0000E+00 63 0.2500000000000000000000000000D+00 0.0000E+00 64 0.2500000000000000000000000000D+00 0.0000E+00 65 0.2500000000000000000000000000D+00 0.0000E+00 66 0.2500000000000000000000000000D+00 0.0000E+00 67 0.2500000000000000000000000000D+00 0.0000E+00 68 0.2500000000000000000000000000D+00 0.0000E+00 69 0.2500000000000000000000000000D+00 0.0000E+00 70 0.2500000000000000000000000000D+00 0.0000E+00 71 0.2500000000000000000000000000D+00 0.0000E+00 72 0.2500000000000000000000000000D+00 0.0000E+00 73 0.2500000000000000000000000000D+00 0.0000E+00 74 0.2500000000000000000000000000D+00 0.0000E+00 75 0.2500000000000000000000000000D+00 0.0000E+00 76 0.2500000000000000000000000000D+00 0.0000E+00 77 0.2500000000000000000000000000D+00 0.0000E+00 78 0.2500000000000000000000000000D+00 0.0000E+00 79 0.2500000000000000000000000000D+00 0.0000E+00 IERR IN CHEB = 0 IDERR IN DCHEB = 0 K DBETA(K) 0 0.3708149354602743836867700694D+01 0.9005E-14 OM2 = 0.500 1 0.5430534189555363746250333773D+00 0.2431E-13 2 0.2293202676904703911217264150D+00 0.1631E-13 3 0.2491525790663757991195108382D+00 0.1434E-13 4 0.2499288948105138848163926211D+00 0.5529E-14 5 0.2499924766475489607913893440D+00 0.1503E-13 6 0.2499991045593934697881805695D+00 0.1864E-14 7 0.2499998855221811249212830678D+00 0.8502E-14 8 0.2499999846431723296083779480D+00 0.4109E-14 9 0.2499999978674175371386805934D+00 0.5698E-14 10 0.2499999996960280038008147854D+00 0.6955E-14 11 0.2499999999557817675311201521D+00 0.9579E-14 12 0.2499999999934617441473865074D+00 0.9160E-14 13 0.2499999999990201961690793560D+00 0.1719E-13 14 0.2499999999998515183461456934D+00 0.2929E-14 15 0.2499999999999772845053474047D+00 0.8614E-14 16 0.2499999999999964964847743109D+00 0.1441E-13 17 0.2499999999999994558098856824D+00 0.1203E-13 18 0.2499999999999999149485799814D+00 0.3402E-15 19 0.2499999999999999866345702704D+00 0.5346E-16 20 0.2499999999999999978894635584D+00 0.8442E-17 21 0.2499999999999999996652731183D+00 0.1339E-17 22 0.2499999999999999999467047744D+00 0.2132E-18 23 0.2499999999999999999914842116D+00 0.3406E-19 24 0.2499999999999999999986349109D+00 0.1421E-13 25 0.2499999999999999999997805298D+00 0.8779E-21 26 0.2499999999999999999999646196D+00 0.1415E-21 27 0.2499999999999999999999942822D+00 0.2287E-22 28 0.2499999999999999999999990738D+00 0.3705E-23 29 0.2499999999999999999999998496D+00 0.6014E-24 30 0.2499999999999999999999999755D+00 0.9784E-25 31 0.2499999999999999999999999960D+00 0.1595E-25 32 0.2499999999999999999999999993D+00 0.2726E-26 33 0.2499999999999999999999999999D+00 0.5049E-27 34 0.2499999999999999999999999999D+00 0.2019E-27 35 0.2500000000000000000000000000D+00 0.0000E+00 36 0.2500000000000000000000000000D+00 0.0000E+00 37 0.2500000000000000000000000000D+00 0.0000E+00 38 0.2499999999999999999999999999D+00 0.2019E-27 39 0.2500000000000000000000000000D+00 0.0000E+00 40 0.2500000000000000000000000000D+00 0.0000E+00 41 0.2500000000000000000000000000D+00 0.0000E+00 42 0.2500000000000000000000000000D+00 0.0000E+00 43 0.2500000000000000000000000000D+00 0.0000E+00 44 0.2500000000000000000000000000D+00 0.0000E+00 45 0.2500000000000000000000000000D+00 0.0000E+00 46 0.2500000000000000000000000000D+00 0.0000E+00 47 0.2500000000000000000000000000D+00 0.0000E+00 48 0.2500000000000000000000000000D+00 0.0000E+00 49 0.2500000000000000000000000000D+00 0.0000E+00 50 0.2500000000000000000000000000D+00 0.0000E+00 51 0.2500000000000000000000000000D+00 0.0000E+00 52 0.2500000000000000000000000000D+00 0.0000E+00 53 0.2500000000000000000000000000D+00 0.0000E+00 54 0.2500000000000000000000000000D+00 0.0000E+00 55 0.2500000000000000000000000000D+00 0.0000E+00 56 0.2500000000000000000000000000D+00 0.0000E+00 57 0.2500000000000000000000000000D+00 0.0000E+00 58 0.2500000000000000000000000000D+00 0.0000E+00 59 0.2500000000000000000000000000D+00 0.0000E+00 60 0.2500000000000000000000000000D+00 0.0000E+00 61 0.2500000000000000000000000000D+00 0.0000E+00 62 0.2500000000000000000000000000D+00 0.0000E+00 63 0.2500000000000000000000000000D+00 0.0000E+00 64 0.2500000000000000000000000000D+00 0.0000E+00 65 0.2500000000000000000000000000D+00 0.0000E+00 66 0.2500000000000000000000000000D+00 0.0000E+00 67 0.2500000000000000000000000000D+00 0.0000E+00 68 0.2500000000000000000000000000D+00 0.0000E+00 69 0.2500000000000000000000000000D+00 0.0000E+00 70 0.2500000000000000000000000000D+00 0.0000E+00 71 0.2500000000000000000000000000D+00 0.0000E+00 72 0.2500000000000000000000000000D+00 0.0000E+00 73 0.2500000000000000000000000000D+00 0.0000E+00 74 0.2500000000000000000000000000D+00 0.0000E+00 75 0.2500000000000000000000000000D+00 0.0000E+00 76 0.2500000000000000000000000000D+00 0.0000E+00 77 0.2500000000000000000000000000D+00 0.0000E+00 78 0.2500000000000000000000000000D+00 0.0000E+00 79 0.2500000000000000000000000000D+00 0.0000E+00 IERR IN CHEB = 0 IDERR IN DCHEB = 0 K DBETA(K) 0 0.4150726270584938287706881112D+01 0.1672E-13 OM2 = 0.700 1 0.5738703563104107993176728175D+00 0.4583E-14 2 0.2153897141137676357945737410D+00 0.9884E-14 3 0.2476685096417081797797802723D+00 0.9911E-14 4 0.2496725302864942073704319339D+00 0.2151E-13 5 0.2499416058341949060862675826D+00 0.1383E-13 6 0.2499882473788614073598289098D+00 0.1031E-13 7 0.2499974543472129489781179846D+00 0.7304E-15 8 0.2499994207099762060333848693D+00 0.1483E-13 9 0.2499998634212174019156802858D+00 0.4960E-14 10 0.2499999669283869369933461353D+00 0.6868E-14 11 0.2499999918236198036754648399D+00 0.8166E-14 12 0.2499999979445508187833392438D+00 0.6957E-14 13 0.2499999994761779763827889382D+00 0.2957E-14 14 0.2499999998649768487726623512D+00 0.1935E-13 15 0.2499999999648583658538018813D+00 0.7238E-14 16 0.2499999999907779333282521984D+00 0.1732E-13 17 0.2499999999975624737716154063D+00 0.1275E-13 18 0.2499999999993516694822329789D+00 0.2148E-13 19 0.2499999999998265998368342322D+00 0.1694E-13 20 0.2499999999999533940488517558D+00 0.1683E-14 21 0.2499999999999874180743147633D+00 0.6516E-14 22 0.2499999999999965898347165282D+00 0.5702E-15 23 0.2499999999999990723966615358D+00 0.1050E-13 24 0.2499999999999997468569199482D+00 0.1013E-14 25 0.2499999999999999307111298251D+00 0.2772E-15 26 0.2499999999999999809827931412D+00 0.7607E-16 27 0.2499999999999999947673593529D+00 0.2093E-16 28 0.2499999999999999985568812753D+00 0.1421E-13 29 0.2499999999999999996011445311D+00 0.1595E-17 30 0.2499999999999999998895426194D+00 0.4418E-18 31 0.2499999999999999999693535707D+00 0.1226E-18 32 0.2499999999999999999914824007D+00 0.3407E-19 33 0.2499999999999999999976288548D+00 0.9485E-20 34 0.2499999999999999999993389129D+00 0.2644E-20 35 0.2499999999999999999998154225D+00 0.7383E-21 36 0.2499999999999999999999483962D+00 0.2064E-21 37 0.2499999999999999999999855544D+00 0.5778E-22 38 0.2499999999999999999999959514D+00 0.1619E-22 39 0.2499999999999999999999988640D+00 0.4544E-23 40 0.2499999999999999999999996809D+00 0.1276E-23 41 0.2499999999999999999999999102D+00 0.3591E-24 42 0.2499999999999999999999999747D+00 0.1012E-24 43 0.2499999999999999999999999929D+00 0.2847E-25 44 0.2499999999999999999999999980D+00 0.7977E-26 45 0.2499999999999999999999999994D+00 0.2423E-26 46 0.2499999999999999999999999998D+00 0.6058E-27 47 0.2499999999999999999999999999D+00 0.2019E-27 48 0.2500000000000000000000000000D+00 0.0000E+00 49 0.2499999999999999999999999999D+00 0.2019E-27 50 0.2500000000000000000000000000D+00 0.0000E+00 51 0.2500000000000000000000000000D+00 0.0000E+00 52 0.2500000000000000000000000000D+00 0.0000E+00 53 0.2500000000000000000000000000D+00 0.0000E+00 54 0.2500000000000000000000000000D+00 0.0000E+00 55 0.2500000000000000000000000000D+00 0.0000E+00 56 0.2500000000000000000000000000D+00 0.0000E+00 57 0.2500000000000000000000000000D+00 0.0000E+00 58 0.2500000000000000000000000000D+00 0.0000E+00 59 0.2500000000000000000000000000D+00 0.0000E+00 60 0.2500000000000000000000000000D+00 0.0000E+00 61 0.2500000000000000000000000000D+00 0.0000E+00 62 0.2500000000000000000000000000D+00 0.0000E+00 63 0.2500000000000000000000000000D+00 0.0000E+00 64 0.2500000000000000000000000000D+00 0.0000E+00 65 0.2500000000000000000000000000D+00 0.0000E+00 66 0.2499999999999999999999999999D+00 0.2019E-27 67 0.2500000000000000000000000000D+00 0.0000E+00 68 0.2500000000000000000000000000D+00 0.0000E+00 69 0.2500000000000000000000000000D+00 0.0000E+00 70 0.2500000000000000000000000000D+00 0.0000E+00 71 0.2500000000000000000000000000D+00 0.0000E+00 72 0.2500000000000000000000000000D+00 0.0000E+00 73 0.2500000000000000000000000000D+00 0.0000E+00 74 0.2500000000000000000000000000D+00 0.0000E+00 75 0.2500000000000000000000000000D+00 0.0000E+00 76 0.2500000000000000000000000000D+00 0.0000E+00 77 0.2500000000000000000000000000D+00 0.0000E+00 78 0.2500000000000000000000000000D+00 0.0000E+00 79 0.2500000000000000000000000000D+00 0.0000E+00 IERR IN CHEB = 0 IDERR IN DCHEB = 0 K DBETA(K) 0 0.5156184226696346376405141543D+01 0.6950E-14 OM2 = 0.900 1 0.6349731661452458711622492613D+00 0.7920E-14 2 0.1891491669986443569648158304D+00 0.2635E-13 3 0.2432300686739866681706961181D+00 0.9595E-14 4 0.2483762717470556873851235676D+00 0.9362E-15 5 0.2494981460742502273663466823D+00 0.6144E-14 6 0.2498235644120523880139606501D+00 0.7324E-14 7 0.2499329382129533954826949121D+00 0.1677E-14 8 0.2499731424622582194182122673D+00 0.8908E-14 9 0.2499888334872043976714436883D+00 0.1305E-13 10 0.2499952249211056861613516018D+00 0.6132E-14 11 0.2499979128874325556448624208D+00 0.9750E-14 12 0.2499990716489163159016030807D+00 0.4842E-14 13 0.2499995811151635493941187088D+00 0.5906E-14 14 0.2499998087271980386357542646D+00 0.7426E-14 15 0.2499999117758036441126071161D+00 0.5477E-14 16 0.2499999589541522526410519238D+00 0.1366E-13 17 0.2499999807604575559920393991D+00 0.3391E-14 18 0.2499999909227213910332412691D+00 0.3055E-14 19 0.2499999956925950094629502830D+00 0.1820E-13 20 0.2499999979455537253194077366D+00 0.1112E-13 21 0.2499999990156325924494555230D+00 0.2940E-14 22 0.2499999995264096544210033399D+00 0.2395E-14 23 0.2499999997713031459436158817D+00 0.7934E-14 24 0.2499999998891893925703582342D+00 0.8340E-14 25 0.2499999999461435478414324485D+00 0.1075E-13 26 0.2499999999737507419372027660D+00 0.6973E-14 27 0.2499999999871731384434618607D+00 0.7950E-14 28 0.2499999999937170944072024856D+00 0.7380E-14 29 0.2499999999969156770212988098D+00 0.1194E-13 30 0.2499999999984827779114949453D+00 0.1336E-13 31 0.2499999999992522327046396607D+00 0.7421E-14 32 0.2499999999996308048115304536D+00 0.1148E-14 33 0.2499999999998174139724912390D+00 0.8620E-14 34 0.2499999999999095610678960703D+00 0.7726E-14 35 0.2499999999999551380343851472D+00 0.5293E-14 36 0.2499999999999777157283138547D+00 0.3872E-14 37 0.2499999999999889163856012029D+00 0.1251E-13 38 0.2499999999999944805522803535D+00 0.6344E-14 39 0.2499999999999972482301653080D+00 0.3204E-14 40 0.2499999999999986265774586242D+00 0.8717E-14 41 0.2499999999999993138055421201D+00 0.2745E-14 42 0.2499999999999996568227766539D+00 0.1284E-13 43 0.2499999999999998282104100896D+00 0.6872E-15 44 0.2499999999999999139278194531D+00 0.3443E-15 45 0.2499999999999999568383382626D+00 0.1726E-15 46 0.2499999999999999783386280898D+00 0.8665E-16 47 0.2499999999999999891204630578D+00 0.4352E-16 48 0.2499999999999999945316443720D+00 0.2187E-16 49 0.2499999999999999972495030779D+00 0.1100E-16 50 0.2499999999999999986156028244D+00 0.5538E-17 51 0.2499999999999999993027424459D+00 0.2789E-17 52 0.2499999999999999996486035894D+00 0.1406E-17 53 0.2499999999999999998228006001D+00 0.7088E-18 54 0.2499999999999999999105916887D+00 0.3576E-18 55 0.2499999999999999999548627890D+00 0.1805E-18 56 0.2499999999999999999772005837D+00 0.9120E-19 57 0.2499999999999999999884777735D+00 0.1421E-13 58 0.2499999999999999999941740774D+00 0.2330E-19 59 0.2499999999999999999970528584D+00 0.1179E-19 60 0.2499999999999999999985084491D+00 0.5966E-20 61 0.2499999999999999999992447877D+00 0.3021E-20 62 0.2499999999999999999996174507D+00 0.1530E-20 63 0.2499999999999999999998061405D+00 0.7754E-21 64 0.2499999999999999999999017207D+00 0.3931E-21 65 0.2499999999999999999999501567D+00 0.1994E-21 66 0.2499999999999999999999747119D+00 0.1012E-21 67 0.2499999999999999999999871654D+00 0.5134E-22 68 0.2499999999999999999999934836D+00 0.2607E-22 69 0.2499999999999999999999966903D+00 0.1324E-22 70 0.2499999999999999999999983185D+00 0.6726E-23 71 0.2499999999999999999999991454D+00 0.3418E-23 72 0.2499999999999999999999995656D+00 0.1738E-23 73 0.2499999999999999999999997790D+00 0.8839E-24 74 0.2499999999999999999999998876D+00 0.4495E-24 75 0.2499999999999999999999999428D+00 0.2288E-24 76 0.2499999999999999999999999709D+00 0.1165E-24 77 0.2499999999999999999999999852D+00 0.5927E-25 78 0.2499999999999999999999999925D+00 0.3019E-25 79 0.2499999999999999999999999962D+00 0.1525E-25 IERR IN CHEB = 0 IDERR IN DCHEB = 0 K DBETA(K) 0 0.7391274725979749355619908411D+01 0.1045E-13 OM2 = 0.990 1 0.7324070684920274763522917773D+00 0.6150E-14 2 0.1479427849683386321203381374D+00 0.1693E-13 3 0.2338554949163391305861598413D+00 0.7757E-14 4 0.2443419680995167639069168716D+00 0.4833E-14 5 0.2473968641083465752633955127D+00 0.2578E-14 6 0.2486202548943184490423548756D+00 0.5089E-14 7 0.2492022455253279683751347413D+00 0.1878E-14 8 0.2495108348820873078088301188D+00 0.1998E-14 9 0.2496871092764909748169056006D+00 0.4508E-14 10 0.2497933988931581641824952669D+00 0.9977E-14 11 0.2498601662192155628188028573D+00 0.4800E-14 12 0.2499034676221020533663127869D+00 0.4993E-14 13 0.2499322763973436023483807309D+00 0.7516E-14 14 0.2499518462973810000631441302D+00 0.1116E-13 15 0.2499653717034652803781567628D+00 0.9095E-14 16 0.2499748562994608555372130536D+00 0.4613E-14 17 0.2499815900555124114558066011D+00 0.1585E-14 18 0.2499864219462821878699396706D+00 0.3972E-16 19 0.2499899213248304987952240007D+00 0.5548E-14 20 0.2499924762634408213553096362D+00 0.3241E-14 21 0.2499943550268148128757315281D+00 0.2376E-14 22 0.2499957453603629556491348547D+00 0.3563E-14 23 0.2499967800924363291651714642D+00 0.7181E-14 24 0.2499975541062351695624174479D+00 0.7214E-14 25 0.2499981357626615138937073944D+00 0.6161E-14 26 0.2499985746929869732184204492D+00 0.4224E-14 27 0.2499989071796163774140646299D+00 0.4135E-15 28 0.2499991599119596132253985826D+00 0.5645E-14 29 0.2499993526338356733305944807D+00 0.3853E-15 30 0.2499995000261038054348812260D+00 0.3023E-14 31 0.2499996130562136721643785296D+00 0.3481E-14 32 0.2499996999526959611715190320D+00 0.1188E-14 33 0.2499997669135220480693883681D+00 0.6667E-15 34 0.2499998186241540461928756938D+00 0.2234E-15 35 0.2499998586385340721352640430D+00 0.9524E-14 36 0.2499998896607161427614732529D+00 0.9180E-14 37 0.2499999137540386272816545560D+00 0.4437E-15 38 0.2499999324971599746617482378D+00 0.9606E-14 39 0.2499999471009277820247909149D+00 0.1713E-14 40 0.2499999584962413690863987514D+00 0.7021E-14 41 0.2499999674003378171871783371D+00 0.1203E-13 42 0.2499999743669626218425193136D+00 0.5698E-14 43 0.2499999798244580488717573773D+00 0.2854E-14 44 0.2499999841047608130830406578D+00 0.1307E-13 45 0.2499999874655373080101220713D+00 0.8446E-14 46 0.2499999901071224060134895954D+00 0.7242E-14 47 0.2499999921855119697236944091D+00 0.2326E-14 48 0.2499999938223503083770563002D+00 0.2798E-14 49 0.2499999951126234719328140642D+00 0.2763E-14 50 0.2499999961305968951712746287D+00 0.2115E-14 51 0.2499999969344064587277270058D+00 0.1838E-14 52 0.2499999975696145183830097519D+00 0.4308E-14 53 0.2499999980719687703044300298D+00 0.6459E-14 54 0.2499999984695459857113345277D+00 0.7220E-14 55 0.2499999987844202263239335276D+00 0.4100E-14 56 0.2499999990339628386423312347D+00 0.1013E-13 57 0.2499999992318568529288242945D+00 0.1058E-14 58 0.2499999993888895322448466702D+00 0.9881E-14 59 0.2499999995135723375482205565D+00 0.3055E-14 60 0.2499999996126264482272000195D+00 0.5476E-15 61 0.2499999996913634107650925333D+00 0.7436E-14 62 0.2499999997539838804755978987D+00 0.5422E-14 63 0.2499999998038123156394446866D+00 0.1082E-14 64 0.2499999998434815319179873900D+00 0.4570E-15 65 0.2499999998750779619152275177D+00 0.8132E-14 66 0.2499999999002560868961616900D+00 0.5906E-14 67 0.2499999999203286590618025439D+00 0.7264E-14 68 0.2499999999363378936760955455D+00 0.4120E-14 69 0.2499999999491116885705258465D+00 0.3037E-14 70 0.2499999999593080530588459338D+00 0.3342E-14 71 0.2499999999674502441989476076D+00 0.8277E-15 72 0.2499999999739545731922478200D+00 0.1228E-13 73 0.2499999999791524256276846235D+00 0.1002E-14 74 0.2499999999833077107440717755D+00 0.7649E-14 75 0.2499999999866306970794232838D+00 0.1765E-14 76 0.2499999999892889893786483428D+00 0.1684E-14 77 0.2499999999914162424302140780D+00 0.1605E-14 78 0.2499999999931190822302459653D+00 0.2755E-14 79 0.2499999999944826062146632982D+00 0.1178E-15 IERR IN CHEB = 0 IDERR IN DCHEB = 0 K DBETA(K) 0 0.9682265121100594060678208257D+01 0.1194E-12 OM2 = 0.999 1 0.7937821421385176965531719571D+00 0.6311E-13 2 0.1198676724605760566508984706D+00 0.2427E-12 3 0.2270401183698990236478358431D+00 0.1423E-13 4 0.2410608787266061460471631497D+00 0.3900E-14 5 0.2454285325203698010528098865D+00 0.8229E-14 6 0.2473016530297635082320973535D+00 0.5952E-14 7 0.2482587060199244993507069567D+00 0.2247E-14 8 0.2488056563182398337702848786D+00 0.5436E-15 9 0.2491436516500235662300446611D+00 0.2490E-14 10 0.2493649425541732785713756724D+00 0.7264E-16 11 0.2495164122910211102422347642D+00 0.5588E-14 12 0.2496238132093984309100496946D+00 0.8068E-14 13 0.2497021807830055845646993234D+00 0.6956E-14 14 0.2497607367186780964244373358D+00 0.2874E-14 15 0.2498053715523733403244514780D+00 0.7799E-15 16 0.2498399785559649451745447768D+00 0.3896E-15 17 0.2498672067961906948509922813D+00 0.7928E-14 18 0.2498889044665883526357482704D+00 0.9971E-14 19 0.2499063894398209200047452537D+00 0.1026E-13 20 0.2499206196165231602203909115D+00 0.8154E-14 21 0.2499323031609509319254796296D+00 0.1026E-13 22 0.2499419715850828499756137364D+00 0.5133E-14 23 0.2499500292585915038956821595D+00 0.2426E-14 24 0.2499567876037903691881455655D+00 0.4016E-14 25 0.2499624891284640857487168428D+00 0.4566E-15 26 0.2499673245856652663185916277D+00 0.1703E-14 27 0.2499714454036620578074169345D+00 0.2906E-14 28 0.2499749728090034183731376502D+00 0.1479E-14 29 0.2499780046038181465987326795D+00 0.4098E-15 30 0.2499806202568039236144397457D+00 0.1100E-13 31 0.2499828847669805689657726897D+00 0.6512E-14 32 0.2499848516240893440607962480D+00 0.9325E-14 33 0.2499865650969887674775692795D+00 0.2794E-14 34 0.2499880620172148980355969873D+00 0.5809E-14 35 0.2499893731797995851944555752D+00 0.8241E-14 36 0.2499905244514168246823682605D+00 0.3269E-14 37 0.2499915376529289251735965670D+00 0.3577E-14 38 0.2499924312667191276936114929D+00 0.1368E-13 39 0.2499932210069768852202778652D+00 0.4305E-14 40 0.2499939202820711464146962184D+00 0.8080E-14 41 0.2499945405714167280803653189D+00 0.4689E-14 42 0.2499950917341830713499801678D+00 0.6968E-14 43 0.2499955822633680825859750068D+00 0.8282E-14 44 0.2499960194958428135558206496D+00 0.8424E-15 45 0.2499964097867341326951169655D+00 0.5632E-14 46 0.2499967586547834795590916777D+00 0.4708E-14 47 0.2499970709039761326045421868D+00 0.1440E-14 48 0.2499973507256851779307102268D+00 0.9192E-15 49 0.2499976017847489179996389014D+00 0.7753E-15 50 0.2499978272922482594570085372D+00 0.2555E-14 51 0.2499980300672327043443863432D+00 0.2898E-14 52 0.2499982125892303062464575832D+00 0.1097E-13 53 0.2499983770430456739044282726D+00 0.1118E-14 54 0.2499985253570833720508446261D+00 0.8731E-14 55 0.2499986592362183971966761407D+00 0.1135E-13 56 0.2499987801900603121699346698D+00 0.5188E-14 57 0.2499988895573149187786363157D+00 0.1112E-14 58 0.2499989885268306062507010812D+00 0.2863E-14 59 0.2499990781558206671129154805D+00 0.1299E-14 60 0.2499991593856739095826996477D+00 0.1221E-13 61 0.2499992330557006258053604460D+00 0.2775E-14 62 0.2499992999151068510107986487D+00 0.7683E-16 63 0.2499993606334448281130268345D+00 0.3220E-14 64 0.2499994158097500327434601393D+00 0.5863E-16 65 0.2499994659805436887853955976D+00 0.4013E-15 66 0.2499995116268533393828096318D+00 0.1171E-14 67 0.2499995531803818592965610137D+00 0.8669E-14 68 0.2499995910289365885902790955D+00 0.6408E-14 69 0.2499996255212144516896407709D+00 0.6265E-14 70 0.2499996569710255211441431787D+00 0.5649E-14 71 0.2499996856610260978327166803D+00 0.5093E-14 72 0.2499997118460226835351908954D+00 0.7707E-15 73 0.2499997357558999483848558192D+00 0.1308E-14 74 0.2499997575982187211295314401D+00 0.1052E-13 75 0.2499997775605239682686717749D+00 0.9442E-14 76 0.2499997958123975237310978975D+00 0.9260E-14 77 0.2499998125072858539381665907D+00 0.4941E-14 78 0.2499998277841292849705531175D+00 0.2824E-14 79 0.2499998417688157876153069211D+00 0.1548E-14 output of test1 with modmom=.false.: IERR IN CHEB = 0 IDERR IN DCHEB = 0 K DBETA(K) 0 0.3224882697440438796459832725D+01 0.1433E-13 OM2 = 0.100 1 0.5065840806382684475158495728D+00 0.1187E-13 2 0.2467293493188785576130435954D+00 0.1943E-13 3 0.2499786103248681596536302022D+00 0.2783E-12 4 0.2499997192892932646699794933D+00 0.2293E-11 5 0.2499999953890031901881028629D+00 0.1065E-10 6 0.2499999999151142217232289544D+00 0.4684E-10 7 0.2499999999983250486706797234D+00 0.2603E-09 8 0.2499999999999653681699413492D+00 0.1572E-08 9 0.2499999999999992594133473805D+00 0.8875E-08 10 0.2499999999999999837548811949D+00 0.4803E-07 11 0.2499999999999999996370863573D+00 0.2684E-06 12 0.2499999999999999999890015809D+00 0.1583E-05 13 0.2500000000000000000137988065D+00 0.9663E-05 14 0.2499999999999999999144912203D+00 0.5969E-04 15 0.2500000000000000005892766820D+00 0.3669E-03 16 0.2499999999999999959164770184D+00 0.2206E-02 17 0.2500000000000000267067176355D+00 0.1288E-01 18 0.2499999999999998379720071920D+00 0.7204E-01 19 0.2500000000000009150882591094D+00 0.4251E+00 IERR IN CHEB = 0 IDERR IN DCHEB = 0 K DBETA(K) 0 0.3427778896357582124077869689D+01 0.8867E-14 OM2 = 0.300 1 0.5222553571575005169932901811D+00 0.5370E-14 2 0.2391089484344383143284396276D+00 0.1529E-13 3 0.2497633566075743756040256634D+00 0.1384E-12 4 0.2499895949326480950578823039D+00 0.1342E-11 5 0.2499994255652457252517512732D+00 0.1092E-10 6 0.2499999644019888681144226174D+00 0.7698E-10 7 0.2499999976333568222970499346D+00 0.4435E-09 8 0.2499999998350340290206302342D+00 0.2222E-08 9 0.2499999999881026637164869565D+00 0.1038E-07 10 0.2499999999991196293284908519D+00 0.4833E-07 11 0.2499999999999335336360523052D+00 0.2409E-06 12 0.2499999999999949003387521603D+00 0.1353E-05 13 0.2499999999999996035487949242D+00 0.8517E-05 14 0.2499999999999999686781356360D+00 0.5630E-04 15 0.2499999999999999982227496019D+00 0.3650E-03 16 0.2499999999999999963194029494D+00 0.2242E-02 17 0.2500000000000000207021909718D+00 0.1307E-01 18 0.2499999999999998610645975228D+00 0.7226E-01 19 0.2500000000000009477819455726D+00 0.4208E+00 IERR IN CHEB = 0 IDERR IN DCHEB = 0 K DBETA(K) 0 0.3708149354602743836867700694D+01 0.9005E-14 OM2 = 0.500 1 0.5430534189555363746250333773D+00 0.2431E-13 2 0.2293202676904703911217264152D+00 0.6115E-13 3 0.2491525790663757991195108389D+00 0.9973E-13 4 0.2499288948105138848163926139D+00 0.2308E-11 5 0.2499924766475489607913894033D+00 0.1822E-10 6 0.2499991045593934697881801862D+00 0.1051E-09 7 0.2499998855221811249212852887D+00 0.5571E-09 8 0.2499999846431723296083659240D+00 0.2909E-08 9 0.2499999978674175371387411867D+00 0.1459E-07 10 0.2499999996960280038005323741D+00 0.6945E-07 11 0.2499999999557817675323460669D+00 0.3275E-06 12 0.2499999999934617441423514997D+00 0.1649E-05 13 0.2499999999990201961894103441D+00 0.9307E-05 14 0.2499999999998515182568170078D+00 0.5788E-04 15 0.2499999999999772849906577539D+00 0.3757E-03 16 0.2499999999999964933063576359D+00 0.2429E-02 17 0.2499999999999994773784998165D+00 0.1529E-01 18 0.2499999999999997775408626986D+00 0.9137E-01 19 0.2500000000000007883792341279D+00 0.5798E+00 IERR IN CHEB = 0 IDERR IN DCHEB = 0 K DBETA(K) 0 0.4150726270584938287706881112D+01 0.1672E-13 OM2 = 0.700 1 0.5738703563104107993176728175D+00 0.4583E-14 2 0.2153897141137676357945737410D+00 0.6610E-14 3 0.2476685096417081797797802732D+00 0.2770E-12 4 0.2496725302864942073704319279D+00 0.2611E-11 5 0.2499416058341949060862676210D+00 0.1662E-10 6 0.2499882473788614073598286910D+00 0.8420E-10 7 0.2499974543472129489781191466D+00 0.3955E-09 8 0.2499994207099762060333787059D+00 0.2054E-08 9 0.2499998634212174019157153457D+00 0.1191E-07 10 0.2499999669283869369931336326D+00 0.6859E-07 11 0.2499999918236198036767635788D+00 0.3752E-06 12 0.2499999979445508187755237032D+00 0.2010E-05 13 0.2499999994761779764297706701D+00 0.1094E-04 14 0.2499999998649768484863554421D+00 0.6139E-04 15 0.2499999999648583676029974411D+00 0.3537E-03 16 0.2499999999907779229177544153D+00 0.2066E-02 17 0.2499999999975625327726883868D+00 0.1210E-01 18 0.2499999999993513521496281053D+00 0.6952E-01 19 0.2499999999998282456694568532D+00 0.4266E+00 IERR IN CHEB = 0 IDERR IN DCHEB = 0 K DBETA(K) 0 0.5156184226696346376405141543D+01 0.6950E-14 OM2 = 0.900 1 0.6349731661452458711622492613D+00 0.3270E-14 2 0.1891491669986443569648158305D+00 0.6756E-13 3 0.2432300686739866681706961195D+00 0.1803E-12 4 0.2483762717470556873851235558D+00 0.2876E-11 5 0.2494981460742502273663467504D+00 0.1765E-10 6 0.2498235644120523880139602570D+00 0.9118E-10 7 0.2499329382129533954826972643D+00 0.4819E-09 8 0.2499731424622582194181989122D+00 0.2747E-08 9 0.2499888334872043976715148711D+00 0.1658E-07 10 0.2499952249211056861609814486D+00 0.1006E-06 11 0.2499979128874325556467785523D+00 0.5896E-06 12 0.2499990716489163158917293162D+00 0.3322E-05 13 0.2499995811151635494455745425D+00 0.1841E-04 14 0.2499998087271980383558568830D+00 0.1032E-03 15 0.2499999117758036457198140400D+00 0.5923E-03 16 0.2499999589541522431052312623D+00 0.3427E-02 17 0.2499999807604576127479385412D+00 0.1962E-01 18 0.2499999909227210587021774835D+00 0.1068E+00 19 0.2499999956925969055814911116D+00 0.6272E+00 IERR IN CHEB = 0 IDERR IN DCHEB = 0 K DBETA(K) 0 0.7391274725979749355619908411D+01 0.1045E-13 OM2 = 0.990 1 0.7324070684920274763522917773D+00 0.6150E-14 2 0.1479427849683386321203381376D+00 0.4924E-14 3 0.2338554949163391305861598433D+00 0.7066E-12 4 0.2443419680995167639069168498D+00 0.5646E-11 5 0.2473968641083465752633956528D+00 0.3728E-10 6 0.2486202548943184490423540952D+00 0.2296E-09 7 0.2492022455253279683751388324D+00 0.1385E-08 8 0.2495108348820873078088079048D+00 0.8281E-08 9 0.2496871092764909748170361959D+00 0.4868E-07 10 0.2497933988931581641816946797D+00 0.2816E-06 11 0.2498601662192155628236710135D+00 0.1627E-05 12 0.2499034676221020533377108253D+00 0.9435E-05 13 0.2499322763973436025090379204D+00 0.5404E-04 14 0.2499518462973809992025803817D+00 0.2982E-03 15 0.2499653717034652847973611384D+00 0.1563E-02 16 0.2499748562994608334747028380D+00 0.7786E-02 17 0.2499815900555125209913830588D+00 0.3822E-01 18 0.2499864219462816313468050505D+00 0.1855E+00 19 0.2499899213248334657189498256D+00 0.1198E+01 IERR IN CHEB = 0 IDERR IN DCHEB = 0 K DBETA(K) 0 0.9682265121100594060678208257D+01 0.1194E-12 OM2 = 0.999 1 0.7937821421385176965531719571D+00 0.6311E-13 2 0.1198676724605760566508984707D+00 0.1537E-12 3 0.2270401183698990236478358456D+00 0.3457E-12 4 0.2410608787266061460471631230D+00 0.6481E-11 5 0.2454285325203698010528100587D+00 0.5193E-10 6 0.2473016530297635082320965795D+00 0.3123E-09 7 0.2482587060199244993507094034D+00 0.1745E-08 8 0.2488056563182398337702789697D+00 0.1037E-07 9 0.2491436516500235662300695460D+00 0.6669E-07 10 0.2493649425541732785711189445D+00 0.4316E-06 11 0.2495164122910211102447012714D+00 0.2663E-05 12 0.2496238132093984308907807478D+00 0.1549E-04 13 0.2497021807830055846970659779D+00 0.8589E-04 14 0.2497607367186780955693561744D+00 0.4658E-03 15 0.2498053715523733457073782618D+00 0.2548E-02 16 0.2498399785559649120090823862D+00 0.1433E-01 17 0.2498672067961908924975572273D+00 0.8448E-01 18 0.2498889044665872234788367299D+00 0.4663E+00 19 0.2499063894398271240566500550D+00 0.4808E+01 C-END-OF-FILE cat < test2.f c c program test2 c c dimension a(199),b(199),fnu(200),alpha(100),beta(100),s(100), *s0(200),s1(200),s2(200) double precision dsigma,da(199),db(199),dnu(200),dalpha(100), *dbeta(100),ds(100),ds0(200),ds1(200),ds2(200) logical modmom,intexp c c This test generates the first n recursion coefficients for the c orthogonal polynomials relative to the weight function c c (x**sigma)*ln(1/x) on (0,1], sigma = -.5, 0, .5, c c where n=100 when using modified (Legendre) moments, and n=12 when c using ordinary moments. It prints the double-precision values of the c coefficients as well as the relative errors of the respective single- c precision values and the maximum relative errors. c modmom=.true. c c Generate the recursion coefficients for the polynomials defining the c modified resp. ordinary moments. c if(modmom) then n=100 ndm1=2*n-1 call recur(ndm1,2,0.,0.,a,b,ierr) call drecur(ndm1,2,0.d0,0.d0,da,db,iderr) else n=12 ndm1=2*n-1 do 10 k=1,ndm1 a(k)=0. b(k)=0. da(k)=0.d0 db(k)=0.d0 10 continue end if do 30 is=1,3 dsigma=-.5d0+.5d0*dble(is-1) sigma=sngl(dsigma) if(is.eq.2) then intexp=.true. else intexp=.false. end if c c Compute the modified resp. ordinary moments using Eqs. (3.12) and c (3.11) of the companion paper. On machines with limited exponent c range, some of the high-order modified moments may underflow, without c this having any deteriorating effect on the accuracy. c call fmm(n,modmom,intexp,sigma,fnu) call dmm(n,modmom,intexp,dsigma,dnu) c c Compute the desired recursion coefficients by means of the modified c Chebyshev algorithm; for the latter, see, e.g., Section 2.4 of c W. Gautschi, ``On generating orthogonal polynomials'', SIAM J. Sci. c Statist. Comput. 3, 1982, 289-317. c call cheb(n,a,b,fnu,alpha,beta,s,ierr,s0,s1,s2) c c On machines with limited single-precision exponent range, the routine c cheb may generate an underflow exception, which however is harmless c and can be ignored. c call dcheb(n,da,db,dnu,dalpha,dbeta,ds,iderr,ds0,ds1,ds2) write(*,1) ierr,iderr 1 format(/6x,'ierr in cheb = ',i4,' iderr in dcheb = ',i4/) c c Compute and print the relative errors and their maxima. c eamax=0. ebmax=0. write(*,2) sigma 2 format(/32x,'sigma =',f5.1) write(*,3) 3 format(/3x,'k',13x,'dalpha(k)',25x,'dbeta(k)'/) do 20 k=1,n km1=k-1 if(iderr.eq.0 .or. km1.lt.abs(iderr)) then write(*,4) km1,dalpha(k),dbeta(k) 4 format(1x,i3,2d33.25) if(ierr.eq.0 .or. km1.lt.abs(ierr)) then erra=sngl(dabs(dble(alpha(k))-dalpha(k))/dalpha(k)) errb=sngl(dabs(dble(beta(k))-dbeta(k))/dbeta(k)) write(*,5) erra,errb 5 format(4x,e12.4,21x,e12.4) if(erra.gt.eamax) then eamax=erra kamax=km1 end if if(errb.gt.ebmax) then ebmax=errb kbmax=km1 end if end if end if 20 continue write(*,6) eamax,kamax,ebmax,kbmax 6 format(/6x,'eamax =',e11.4,' at',i3,9x,'ebmax =',e11.4, * ' at',i3//) 30 continue stop end subroutine fmm(n,modmom,intexp,sigma,fnu) c c This generates the first 2*n modified moments (if modmom=.true.) c relative to shifted monic Legendre polynomials, using Eq. (3.12) of c the companion paper, and the first 2*n ordinary moments (if modmom c =.false.) by Eq. (3.11), of the weight function c c (x**sigma)*ln(1/x) on (0,1], sigma > -1, c c for sigma an integer (if intexp=.true.) or a real number (if intexp c =.false.). In either case, the input variable sigma is of type real. c dimension fnu(*) logical modmom,intexp c c The array fnu is assumed to have dimension 2*n. c nd=2*n sigp1=sigma+1. if(modmom) then isigma=int(sigma) isigp1=isigma+1 isigp2=isigma+2 isigp3=isigma+3 if(intexp .and. isigp1.lt.nd) then kmax=isigp1 else kmax=nd end if c=1. do 20 k=1,kmax km1=k-1 fk=real(k) p=1. s=1./sigp1 if(kmax.gt.1) then do 10 i=1,km1 fi=real(i) p=(sigp1-fi)*p/(sigp1+fi) s=s+1./(sigp1+fi)-1./(sigp1-fi) 10 continue end if fnu(k)=c*s*p/sigp1 c=fk*c/(4.*fk-2.) 20 continue if(.not.intexp .or. isigp1.ge.nd) return q=-.5 if(isigma.gt.0) then do 30 iq=1,isigma fiq=real(iq) q=fiq*fiq*q/((2.*fiq+1.)*(2.*fiq+2.)) 30 continue end if fnu(isigp2)=c*q if(isigp2.eq.nd) return do 40 k=isigp3,nd km1=k-1 fkm1=real(km1) fnu(k)=-fkm1*(fkm1-sigp1)*fnu(km1)/((4.*fkm1-2.)* * (fkm1+sigp1)) 40 continue return else do 50 k=1,nd fkm1=real(k-1) fnu(k)=(1./(sigp1+fkm1))**2 50 continue end if end subroutine dmm(n,modmom,intexp,dsigma,dnu) c c This is a double-precision version of the routine fmm. c double precision dsigma,dnu(*),dsigp1,dc,dk,dp,ds,di,dq,diq,dkm1 logical modmom,intexp c c The array dnu is assumed to have dimension 2*n. c nd=2*n dsigp1=dsigma+1.d0 if(modmom) then isigma=idint(dsigma) isigp1=isigma+1 isigp2=isigma+2 isigp3=isigma+3 if(intexp .and. isigp1.lt.nd) then kmax=isigp1 else kmax=nd end if dc=1.d0 do 20 k=1,kmax km1=k-1 dk=dble(k) dp=1.d0 ds=1.d0/dsigp1 if(kmax.gt.1) then do 10 i=1,km1 di=dble(i) dp=(dsigp1-di)*dp/(dsigp1+di) ds=ds+1.d0/(dsigp1+di)-1.d0/(dsigp1-di) 10 continue end if dnu(k)=dc*ds*dp/dsigp1 dc=dk*dc/(4.d0*dk-2.d0) 20 continue if(.not.intexp .or. isigp1.ge.nd) return dq=-.5d0 if(isigma.gt.0) then do 30 iq=1,isigma diq=dble(iq) dq=diq*diq*dq/((2.d0*diq+1.d0)*(2.d0*diq+2.d0)) 30 continue end if dnu(isigp2)=dc*dq if(isigp2.eq.nd) return do 40 k=isigp3,nd km1=k-1 dkm1=dble(km1) dnu(k)=-dkm1*(dkm1-dsigp1)*dnu(km1)/((4.d0*dkm1-2.d0)* * (dkm1+dsigp1)) 40 continue return else do 50 k=1,nd dkm1=dble(k-1) dnu(k)=(1.d0/(dsigp1+dkm1))**2 50 continue end if end C-END-OF-FILE cat < test2.out output of test2 with modmom=.true.: IERR IN CHEB = 0 IDERR IN DCHEB = 0 SIGMA = -0.5 K DALPHA(K) DBETA(K) 0 0.1111111111111111111111111D+00 0.4000000000000000000000000D+01 0.2842E-13 0.0000E+00 1 0.4661483641075477810171688D+00 0.2765432098765432098765432D-01 0.1784E-12 0.1292E-12 2 0.4880690581976426561739654D+00 0.5534292684170711183265476D-01 0.4460E-12 0.6611E-12 3 0.4938743419208057331274822D+00 0.5940526298488865183067045D-01 0.7147E-12 0.1102E-11 4 0.4962639578613459263700277D+00 0.6077714606674732893827287D-01 0.8756E-12 0.1657E-11 5 0.4974805136345470499404327D+00 0.6140371143126410746951299D-01 0.1038E-11 0.1904E-11 6 0.4981846424539394712819088D+00 0.6174167659202270796881379D-01 0.1291E-11 0.2342E-11 7 0.4986290336259843770529448D+00 0.6194453627914717711328688D-01 0.1602E-11 0.2873E-11 8 0.4989276082849235415546195D+00 0.6207576580933626144340940D-01 0.1966E-11 0.3595E-11 9 0.4991379564664850047980802D+00 0.6216550244588411861001341D-01 0.2280E-11 0.4255E-11 10 0.4992917697449965925976574D+00 0.6222955193630939853437094D-01 0.2669E-11 0.4938E-11 11 0.4994076708859089483520375D+00 0.6227685326078544899112281D-01 0.2975E-11 0.5692E-11 12 0.4994971916094638566242202D+00 0.6231277082877488477563886D-01 0.3285E-11 0.6235E-11 13 0.4995677851751364266156599D+00 0.6234068199929453251339864D-01 0.3624E-11 0.6929E-11 14 0.4996244439462620957645566D+00 0.6236279899520571298076283D-01 0.3872E-11 0.7554E-11 15 0.4996706145979840808548842D+00 0.6238061988995864213325718D-01 0.4229E-11 0.8110E-11 16 0.4997087392464561491728915D+00 0.6239518834725249753338138D-01 0.4618E-11 0.8834E-11 17 0.4997405876531736626190872D+00 0.6240724948356001710689111D-01 0.4981E-11 0.9630E-11 18 0.4997674679010946606417245D+00 0.6241734675384434899468191D-01 0.5361E-11 0.1033E-10 19 0.4997903638440694047466612D+00 0.6242588405027882485913615D-01 0.5713E-11 0.1110E-10 20 0.4998100270509691381859106D+00 0.6243316658846858305615025D-01 0.6055E-11 0.1182E-10 21 0.4998270396901901811053116D+00 0.6243942847487754986053115D-01 0.6457E-11 0.1247E-10 22 0.4998418584011269547061628D+00 0.6244485169209210663968073D-01 0.6910E-11 0.1343E-10 23 0.4998548454525784424706020D+00 0.6244957942452422353437694D-01 0.7300E-11 0.1421E-10 24 0.4998662912324218943801592D+00 0.6245372557342242600457226D-01 0.7747E-11 0.1501E-10 25 0.4998764307204424397405948D+00 0.6245738165737186124658778D-01 0.8148E-11 0.1599E-10 26 0.4998854557169246669449019D+00 0.6246062188808478979166957D-01 0.8564E-11 0.1667E-10 27 0.4998935240328226886591572D+00 0.6246350695269707453479568D-01 0.9086E-11 0.1769E-10 28 0.4999007664750365107918077D+00 0.6246608686595204798542240D-01 0.9580E-11 0.1864E-10 29 0.4999072922115382430628671D+00 0.6246840314472866468672816D-01 0.1016E-10 0.1970E-10 30 0.4999131929321822564939469D+00 0.6247049048282836967879567D-01 0.1067E-10 0.2085E-10 31 0.4999185461046623069180692D+00 0.6247237805306714282029063D-01 0.1125E-10 0.2190E-10 32 0.4999234175438090965764987D+00 0.6247409052851061161429977D-01 0.1178E-10 0.2307E-10 33 0.4999278634549460876866086D+00 0.6247564888999735836355421D-01 0.1219E-10 0.2399E-10 34 0.4999319320708932838633869D+00 0.6247707106956441823595053D-01 0.1266E-10 0.2480E-10 35 0.4999356649724540623274387D+00 0.6247837246679940094973984D-01 0.1320E-10 0.2592E-10 36 0.4999390981604717422591136D+00 0.6247956636600570708844247D-01 0.1371E-10 0.2689E-10 37 0.4999422629314923704886477D+00 0.6248066427536794284683246D-01 0.1419E-10 0.2788E-10 38 0.4999451865971175754297572D+00 0.6248167620434672378022245D-01 0.1467E-10 0.2883E-10 39 0.4999478930781540114073128D+00 0.6248261089183034006005443D-01 0.1521E-10 0.2990E-10 40 0.4999504033978688392463883D+00 0.6248347599478382249321287D-01 0.1585E-10 0.3105E-10 41 0.4999527360934751182615016D+00 0.6248427824502116118751316D-01 0.1646E-10 0.3228E-10 42 0.4999549075609863005157917D+00 0.6248502358010969536816872D-01 0.1713E-10 0.3363E-10 43 0.4999569323454961738619833D+00 0.6248571725317097460386049D-01 0.1778E-10 0.3491E-10 44 0.4999588233865400022085640D+00 0.6248636392537765834044482D-01 0.1846E-10 0.3620E-10 45 0.4999605922263117426170317D+00 0.6248696774419352905015697D-01 0.1915E-10 0.3762E-10 46 0.4999622491870299058307070D+00 0.6248753240981319504469108D-01 0.1976E-10 0.3892E-10 47 0.4999638035225698808616725D+00 0.6248806123179200596514721D-01 0.2038E-10 0.4014E-10 48 0.4999652635485445800661969D+00 0.6248855717748684742433618D-01 0.2106E-10 0.4147E-10 49 0.4999666367542657434951760D+00 0.6248902291363342497098043D-01 0.2164E-10 0.4275E-10 50 0.4999679298994151058697458D+00 0.6248946084214908332126385D-01 0.2220E-10 0.4381E-10 51 0.4999691490977670252895535D+00 0.6248987313105962943007473D-01 0.2280E-10 0.4499E-10 52 0.4999702998899082096191760D+00 0.6249026174129439284484898D-01 0.2345E-10 0.4626E-10 53 0.4999713873065772549159492D+00 0.6249062844996838433907695D-01 0.2401E-10 0.4749E-10 54 0.4999724159239822749292820D+00 0.6249097487066807275398101D-01 0.2462E-10 0.4858E-10 55 0.4999733899122375046656649D+00 0.6249130247117342087934171D-01 0.2533E-10 0.4995E-10 56 0.4999743130778803590509506D+00 0.6249161258897980601024295D-01 0.2613E-10 0.5145E-10 57 0.4999751889012818397363903D+00 0.6249190644492645302489131D-01 0.2690E-10 0.5302E-10 58 0.4999760205696396844641164D+00 0.6249218515519076536316924D-01 0.2773E-10 0.5465E-10 59 0.4999768110061406606236640D+00 0.6249244974186864670497903D-01 0.2849E-10 0.5624E-10 60 0.4999775628957922328764516D+00 0.6249270114232811644774819D-01 0.2922E-10 0.5768E-10 61 0.4999782787083515100262005D+00 0.6249294021749607086844031D-01 0.3009E-10 0.5926E-10 62 0.4999789607187184893133688D+00 0.6249316775921498850954361D-01 0.3093E-10 0.6109E-10 63 0.4999796110251092079375052D+00 0.6249338449678696015999789D-01 0.3172E-10 0.6263E-10 64 0.4999802315652808832931335D+00 0.6249359110280602015518800D-01 0.3259E-10 0.6430E-10 65 0.4999808241310441662847610D+00 0.6249378819836585975999630D-01 0.3343E-10 0.6600E-10 66 0.4999813903812661709776500D+00 0.6249397635771819984114799D-01 0.3428E-10 0.6774E-10 67 0.4999819318535410926892670D+00 0.6249415611244704749850511D-01 0.3519E-10 0.6946E-10 68 0.4999824499746822529848128D+00 0.6249432795521547829357329D-01 0.3603E-10 0.7128E-10 69 0.4999829460701697066273291D+00 0.6249449234313423932856532D-01 0.3689E-10 0.7289E-10 70 0.4999834213726706073831202D+00 0.6249464970079516550903630D-01 0.3781E-10 0.7471E-10 71 0.4999838770297349356284461D+00 0.6249480042300698114169577D-01 0.3858E-10 0.7647E-10 72 0.4999843141107565888762889D+00 0.6249494487726638748190090D-01 0.3937E-10 0.7793E-10 73 0.4999847336132789314898946D+00 0.6249508340599330177430745D-01 0.4024E-10 0.7963E-10 74 0.4999851364687144438985805D+00 0.6249521632855562063538541D-01 0.4104E-10 0.8128E-10 75 0.4999855235475398955558700D+00 0.6249534394310585118905246D-01 0.4183E-10 0.8288E-10 76 0.4999858956640213131307627D+00 0.6249546652824932049195603D-01 0.4267E-10 0.8451E-10 77 0.4999862535805167765288282D+00 0.6249558434456138111659899D-01 0.4343E-10 0.8611E-10 78 0.4999865980113996234652464D+00 0.6249569763596903056671454D-01 0.4423E-10 0.8765E-10 79 0.4999869296266398705890535D+00 0.6249580663101061396102569D-01 0.4507E-10 0.8930E-10 80 0.4999872490550774736510815D+00 0.6249591154398574866660388D-01 0.4589E-10 0.9095E-10 81 0.4999875568874173723953749D+00 0.6249601257600626690066199D-01 0.4677E-10 0.9266E-10 82 0.4999878536789730305318126D+00 0.6249610991595779263883088D-01 0.4762E-10 0.9446E-10 83 0.4999881399521823296847290D+00 0.6249620374138053097068321D-01 0.4851E-10 0.9610E-10 84 0.4999884161989171590890288D+00 0.6249629421927693288786306D-01 0.4941E-10 0.9793E-10 85 0.4999886828826058173914092D+00 0.6249638150685309052629655D-01 0.5027E-10 0.9971E-10 86 0.4999889404401853724423155D+00 0.6249646575220000346266932D-01 0.5112E-10 0.1014E-09 87 0.4999891892838993776656731D+00 0.6249654709492022401174982D-01 0.5201E-10 0.1032E-09 88 0.4999894298029547919706245D+00 0.6249662566670482840875654D-01 0.5293E-10 0.1050E-09 89 0.4999896623650505703804859D+00 0.6249670159186516247938763D-01 0.5376E-10 0.1067E-09 90 0.4999898873177891638918130D+00 0.6249677498782336725853075D-01 0.5463E-10 0.1084E-09 91 0.4999901049899810715268292D+00 0.6249684596556529537947903D-01 0.5550E-10 0.1102E-09 92 0.4999903156928516094091928D+00 0.6249691463005907714323314D-01 0.5633E-10 0.1119E-09 93 0.4999905197211581872778771D+00 0.6249698108064228095881834D-01 0.5716E-10 0.1135E-09 94 0.4999907173542256001838438D+00 0.6249704541138033192705537D-01 0.5802E-10 0.1152E-09 95 0.4999909088569061417086197D+00 0.6249710771139860088117153D-01 0.5890E-10 0.1169E-09 96 0.4999910944804707157151021D+00 0.6249716806519035083547535D-01 0.5976E-10 0.1187E-09 97 0.4999912744634365583230272D+00 0.6249722655290252557984422D-01 0.6057E-10 0.1203E-09 98 0.4999914490323366734035746D+00 0.6249728325060118350439252D-01 0.6141E-10 0.1220E-09 99 0.4999916184024356271670789D+00 0.6249733823051821636937156D-01 0.6211E-10 0.1235E-09 EAMAX = 0.6211E-10 AT 99 EBMAX = 0.1235E-09 AT 99 IERR IN CHEB = 0 IDERR IN DCHEB = 0 SIGMA = 0.0 K DALPHA(K) DBETA(K) 0 0.2500000000000000000000000D+00 0.1000000000000000000000000D+01 0.0000E+00 0.0000E+00 1 0.4642857142857142857142857D+00 0.4861111111111111111111111D-01 0.1312E-13 0.2639E-13 2 0.4854824464561713402517112D+00 0.5868480725623582766439909D-01 0.2288E-13 0.4939E-13 3 0.4921030818713608586050337D+00 0.6072858391891785822637763D-01 0.4578E-13 0.7445E-13 4 0.4950284987583539049494567D+00 0.6148202019693696071375070D-01 0.6221E-13 0.1250E-12 5 0.4965795116435580984519746D+00 0.6184080953188484218106730D-01 0.8189E-13 0.1379E-12 6 0.4975013013049582411838083D+00 0.6203906295445598496037138D-01 0.8694E-13 0.1672E-12 7 0.4980940182042518540907413D+00 0.6215991915828943043448013D-01 0.9170E-13 0.1873E-12 8 0.4984978019782527493617411D+00 0.6223893767166674441228095D-01 0.1133E-12 0.2065E-12 9 0.4987853226556929738980263D+00 0.6229338867990748308084260D-01 0.1226E-12 0.2595E-12 10 0.4989973531671536624227043D+00 0.6233247750665634201166525D-01 0.1535E-12 0.2897E-12 11 0.4991582216780129299345265D+00 0.6236147348381100858979132D-01 0.1719E-12 0.3359E-12 12 0.4992831802157361310272625D+00 0.6238356835953571123560330D-01 0.1963E-12 0.3805E-12 13 0.4993821876708659391916256D+00 0.6240078643427266552454125D-01 0.2307E-12 0.4280E-12 14 0.4994619720966186081501716D+00 0.6241446153535189814894302D-01 0.2492E-12 0.5015E-12 15 0.4995272124267306332814372D+00 0.6242550130298840435441763D-01 0.2839E-12 0.5513E-12 16 0.4995812447300375902610308D+00 0.6243454062356624546528951D-01 0.3048E-12 0.6154E-12 17 0.4996264998058222738864005D+00 0.6244203431425522665242969D-01 0.3299E-12 0.6528E-12 18 0.4996647829280136809732498D+00 0.6244831505981949444443223D-01 0.3458E-12 0.6913E-12 19 0.4996974576412242075578802D+00 0.6245363072435638507373495D-01 0.3739E-12 0.7323E-12 20 0.4997255694718122716627491D+00 0.6245816901837448725144309D-01 0.4029E-12 0.7921E-12 21 0.4997499310067592882605290D+00 0.6246207418964090992246729D-01 0.4302E-12 0.8641E-12 22 0.4997711815425514461486568D+00 0.6246545855360315677000643D-01 0.4528E-12 0.9041E-12 23 0.4997898296374528440927498D+00 0.6246841060865245759104617D-01 0.4817E-12 0.9610E-12 24 0.4998062839486146398501532D+00 0.6247100084469111001639128D-01 0.5105E-12 0.1012E-11 25 0.4998208759015741365903055D+00 0.6247328596467972262924752D-01 0.5208E-12 0.1059E-11 26 0.4998338765749831628531735D+00 0.6247531199583130438086609D-01 0.5280E-12 0.1071E-11 27 0.4998455094286890040986238D+00 0.6247711661195300995777342D-01 0.5418E-12 0.1090E-11 28 0.4998559600051912951546279D+00 0.6247873088741341491450190D-01 0.5531E-12 0.1125E-11 29 0.4998653834001782684040857D+00 0.6248018063625859555633633D-01 0.5850E-12 0.1135E-11 30 0.4998739100699455950707739D+00 0.6248148744489220418147314D-01 0.6076E-12 0.1204E-11 31 0.4998816503859023411215063D+00 0.6248266947588215845157551D-01 0.6336E-12 0.1254E-11 32 0.4998886982359269976838699D+00 0.6248374209905709477262265D-01 0.6659E-12 0.1321E-11 33 0.4998951338939793992052415D+00 0.6248471839101898767466744D-01 0.6760E-12 0.1363E-11 34 0.4999010263231367171309733D+00 0.6248560953350398750843817D-01 0.7103E-12 0.1403E-11 35 0.4999064350364226887693023D+00 0.6248642513333126814156294D-01 0.7259E-12 0.1454E-11 36 0.4999114116099006454717312D+00 0.6248717348108807027478547D-01 0.7530E-12 0.1492E-11 37 0.4999160009203821298672548D+00 0.6248786176159410118430076D-01 0.7806E-12 0.1543E-11 38 0.4999202421635933128956971D+00 0.6248849622614664564112328D-01 0.8097E-12 0.1623E-11 39 0.4999241696962148209413941D+00 0.6248908233427397182789098D-01 0.8322E-12 0.1665E-11 40 0.4999278137357828840785235D+00 0.6248962487101087697580835D-01 0.8575E-12 0.1715E-11 41 0.4999312009452334776507319D+00 0.6249012804440846928879119D-01 0.8874E-12 0.1736E-11 42 0.4999343549233237402868303D+00 0.6249059556699416397224481D-01 0.8981E-12 0.1803E-11 43 0.4999372966178657615142740D+00 0.6249103072413028142506413D-01 0.9244E-12 0.1831E-11 44 0.4999400446753546611038819D+00 0.6249143643162421195422989D-01 0.9435E-12 0.1883E-11 45 0.4999426157379416464197606D+00 0.6249181528447831946053721D-01 0.9634E-12 0.1942E-11 46 0.4999450246966260395316235D+00 0.6249216959830275591468911D-01 0.9817E-12 0.1955E-11 47 0.4999472849078921912024467D+00 0.6249250144462608285077586D-01 0.1014E-11 0.2005E-11 48 0.4999494083797023879356424D+00 0.6249281268110967462373889D-01 0.1023E-11 0.2060E-11 49 0.4999514059317026413232424D+00 0.6249310497748914279024519D-01 0.1050E-11 0.2094E-11 50 0.4999532873336489086320336D+00 0.6249337983791942691734170D-01 0.1078E-11 0.2135E-11 51 0.4999550614253738620244102D+00 0.6249363862028203608455978D-01 0.1114E-11 0.2205E-11 52 0.4999567362210554809764463D+00 0.6249388255291724800724901D-01 0.1124E-11 0.2266E-11 53 0.4999583190000925121709272D+00 0.6249411274916626210968730D-01 0.1135E-11 0.2299E-11 54 0.4999598163865178691000496D+00 0.6249433022004475714419017D-01 0.1158E-11 0.2296E-11 55 0.4999612344185733024907224D+00 0.6249453588531719892432816D-01 0.1171E-11 0.2326E-11 56 0.4999625786098144828871262D+00 0.6249473058319835429750671D-01 0.1194E-11 0.2358E-11 57 0.4999638540029049218074105D+00 0.6249491507887303231178769D-01 0.1226E-11 0.2428E-11 58 0.4999650652170818751865808D+00 0.6249509007199569220230538D-01 0.1256E-11 0.2492E-11 59 0.4999662164901310761119598D+00 0.6249525620330711203904189D-01 0.1268E-11 0.2550E-11 60 0.4999673117155846456334848D+00 0.6249541406048490493276837D-01 0.1297E-11 0.2561E-11 61 0.4999683544757536398505338D+00 0.6249556418332757968524932D-01 0.1327E-11 0.2640E-11 62 0.4999693480711200101821521D+00 0.6249570706835748627317068D-01 0.1346E-11 0.2695E-11 63 0.4999702955465395160004566D+00 0.6249584317291589031524770D-01 0.1379E-11 0.2732E-11 64 0.4999711997146450759203140D+00 0.6249597291881319941240034D-01 0.1403E-11 0.2785E-11 65 0.4999720631767873250790975D+00 0.6249609669558870323104158D-01 0.1420E-11 0.2842E-11 66 0.4999728883418042390181040D+00 0.6249621486342683043728300D-01 0.1455E-11 0.2898E-11 67 0.4999736774428733353066583D+00 0.6249632775577065693930967D-01 0.1470E-11 0.2932E-11 68 0.4999744325526671336346934D+00 0.6249643568166804635441350D-01 0.1502E-11 0.3000E-11 69 0.4999751555970043823352609D+00 0.6249653892788122038545937D-01 0.1524E-11 0.3040E-11 70 0.4999758483671653274118096D+00 0.6249663776078662370400743D-01 0.1559E-11 0.3082E-11 71 0.4999765125310184110475319D+00 0.6249673242808856498841226D-01 0.1580E-11 0.3145E-11 72 0.4999771496430877398597959D+00 0.6249682316036719949611034D-01 0.1608E-11 0.3203E-11 73 0.4999777611536750390557829D+00 0.6249691017247889912271663D-01 0.1617E-11 0.3238E-11 74 0.4999783484171362541107596D+00 0.6249699366482487472502745D-01 0.1653E-11 0.3303E-11 75 0.4999789126994011789874200D+00 0.6249707382450202327943004D-01 0.1670E-11 0.3332E-11 76 0.4999794551848142277020037D+00 0.6249715082634832765922600D-01 0.1692E-11 0.3368E-11 77 0.4999799769823655111411284D+00 0.6249722483389370432450252D-01 0.1710E-11 0.3431E-11 78 0.4999804791313735525337511D+00 0.6249729600022594427483634D-01 0.1741E-11 0.3486E-11 79 0.4999809626066741189503632D+00 0.6249736446878029995706861D-01 0.1776E-11 0.3514E-11 80 0.4999814283233636313712341D+00 0.6249743037406031395183483D-01 0.1807E-11 0.3594E-11 81 0.4999818771411403300686896D+00 0.6249749384229664585259313D-01 0.1830E-11 0.3642E-11 82 0.4999823098682817192391867D+00 0.6249755499204991613499568D-01 0.1845E-11 0.3692E-11 83 0.4999827272652927125951614D+00 0.6249761393476293657928818D-01 0.1880E-11 0.3736E-11 84 0.4999831300482552791471555D+00 0.6249767077526712444565527D-01 0.1894E-11 0.3798E-11 85 0.4999835188919071846647117D+00 0.6249772561224739221906045D-01 0.1914E-11 0.3826E-11 86 0.4999838944324745866588901D+00 0.6249777853866935781575845D-01 0.1939E-11 0.3862E-11 87 0.4999842572702807236773290D+00 0.6249782964217232432656308D-01 0.1975E-11 0.3922E-11 88 0.4999846079721507038432192D+00 0.6249787900543112730742584D-01 0.1994E-11 0.3986E-11 89 0.4999849470736304087258701D+00 0.6249792670648963581339862D-01 0.2009E-11 0.4019E-11 90 0.4999852750810357571085502D+00 0.6249797281906841603487619D-01 0.2028E-11 0.4036E-11 91 0.4999855924733469931771618D+00 0.6249801741284881938847791D-01 0.2046E-11 0.4081E-11 92 0.4999858997039612525659040D+00 0.6249806055373553663046258D-01 0.2067E-11 0.4129E-11 93 0.4999861972023153978985746D+00 0.6249810230409946285286466D-01 0.2090E-11 0.4183E-11 94 0.4999864853753899857627109D+00 0.6249814272300254234581504D-01 0.2108E-11 0.4229E-11 95 0.4999867646091042143925788D+00 0.6249818186640610486311477D-01 0.2131E-11 0.4263E-11 96 0.4999870352696107925132529D+00 0.6249821978736406371004936D-01 0.2158E-11 0.4292E-11 97 0.4999872977044988532172624D+00 0.6249825653620221943945057D-01 0.2165E-11 0.4327E-11 98 0.4999875522439123022113293D+00 0.6249829216068479917556125D-01 0.2211E-11 0.4379E-11 99 0.4999877992015903283047919D+00 0.6249832670616925926204896D-01 0.2237E-11 0.4446E-11 EAMAX = 0.2237E-11 AT 99 EBMAX = 0.4446E-11 AT 99 IERR IN CHEB = 0 IDERR IN DCHEB = 0 SIGMA = 0.5 K DALPHA(K) DBETA(K) 0 0.3600000000000000000000000D+00 0.4444444444444444444444444D+00 0.2132E-13 0.1954E-13 1 0.4719914117015566290928610D+00 0.5407346938775510204081633D-01 0.4742E-13 0.9773E-13 2 0.4879269724351617942679262D+00 0.5943841686774258104224939D-01 0.4411E-13 0.1109E-12 3 0.4932798327365417067423327D+00 0.6091940289441790471800011D-01 0.6024E-13 0.1224E-12 4 0.4957216320837135342773834D+00 0.6153509994700859144730978D-01 0.6915E-13 0.1376E-12 5 0.4970386426421355402433441D+00 0.6184950526468488541437227D-01 0.8700E-13 0.1593E-12 6 0.4978294203847389969822529D+00 0.6203162731630896597352813D-01 0.1126E-12 0.1952E-12 7 0.4983412074859196337520109D+00 0.6214656330041469428590224D-01 0.1170E-12 0.2164E-12 8 0.4986913480145008158357355D+00 0.6222375466280028995988519D-01 0.1301E-12 0.2589E-12 9 0.4989413835287815429850298D+00 0.6227810665498392805707788D-01 0.1514E-12 0.2910E-12 10 0.4991261249443936636915347D+00 0.6231782657996529774306834D-01 0.1650E-12 0.3382E-12 11 0.4992664682477055927182757D+00 0.6234773797508452199599062D-01 0.1737E-12 0.3418E-12 12 0.4993755732917555644203267D+00 0.6237082738280752611960887D-01 0.1877E-12 0.3756E-12 13 0.4994620627897156306981325D+00 0.6238902459454281914249312D-01 0.2163E-12 0.4120E-12 14 0.4995317778015998082616149D+00 0.6240362179255481511368181D-01 0.2197E-12 0.4527E-12 15 0.4995887889551455894238523D+00 0.6241551074437725515664532D-01 0.2449E-12 0.4717E-12 16 0.4996360033773615874569452D+00 0.6242532304911859697584015D-01 0.2495E-12 0.5028E-12 17 0.4996755420559208811991705D+00 0.6243351622682346972392998D-01 0.2612E-12 0.5263E-12 18 0.4997089817666155927613889D+00 0.6244042830417754417921846D-01 0.2684E-12 0.5553E-12 19 0.4997375143993141903485142D+00 0.6244631341888401724625467D-01 0.2849E-12 0.5663E-12 20 0.4997620544096438217950718D+00 0.6245136563006098053160644D-01 0.2850E-12 0.5875E-12 21 0.4997833128374760845597535D+00 0.6245573519842510412423656D-01 0.3063E-12 0.6032E-12 22 0.4998018492728466982272779D+00 0.6245953994072605716404695D-01 0.3151E-12 0.6345E-12 23 0.4998181089701914535760930D+00 0.6246287329138696125060280D-01 0.3395E-12 0.6712E-12 24 0.4998324497706394488722725D+00 0.6246581011945496883543089D-01 0.3545E-12 0.7165E-12 25 0.4998451619096538438402624D+00 0.6246841098796679818788527D-01 0.3688E-12 0.7332E-12 26 0.4998564827801957268954676D+00 0.6247072531490881204449373D-01 0.3626E-12 0.7533E-12 27 0.4998666080678056467977383D+00 0.6247279374805509669862980D-01 0.3853E-12 0.7634E-12 28 0.4998757002418247017210173D+00 0.6247464996949865776164874D-01 0.3942E-12 0.7973E-12 29 0.4998838950965001447988206D+00 0.6247632208123854681624580D-01 0.4149E-12 0.8423E-12 30 0.4998913068374629443080956D+00 0.6247783367943595945401558D-01 0.4284E-12 0.8658E-12 31 0.4998980320718154123236136D+00 0.6247920469481738505487917D-01 0.4336E-12 0.8832E-12 32 0.4999041529637934192289478D+00 0.6248045205566242753443320D-01 0.4404E-12 0.9007E-12 33 0.4999097397496046158651518D+00 0.6248159021493702067538866D-01 0.4553E-12 0.9183E-12 34 0.4999148527559424898122170D+00 0.6248263157248967419492307D-01 0.4757E-12 0.9541E-12 35 0.4999195440310304794672079D+00 0.6248358681553027106912242D-01 0.4838E-12 0.9743E-12 36 0.4999238586709130706291502D+00 0.6248446519498547085172373D-01 0.4942E-12 0.9996E-12 37 0.4999278359043646441993023D+00 0.6248527475117414361228339D-01 0.5095E-12 0.1020E-11 38 0.4999315099853402155579072D+00 0.6248602249915596165535206D-01 0.5168E-12 0.1049E-11 39 0.4999349109310140409691553D+00 0.6248671458178573912330464D-01 0.5334E-12 0.1055E-11 40 0.4999380651351962451100940D+00 0.6248735639674952332535790D-01 0.5314E-12 0.1096E-11 41 0.4999409958806052161048960D+00 0.6248795270251860659803352D-01 0.5651E-12 0.1123E-11 42 0.4999437237686129203082009D+00 0.6248850770712829033823226D-01 0.5611E-12 0.1142E-11 43 0.4999462670813125059807219D+00 0.6248902514289202603706833D-01 0.5674E-12 0.1130E-11 44 0.4999486420878182968971901D+00 0.6248950832954168059759670D-01 0.5738E-12 0.1156E-11 45 0.4999508633044014524286604D+00 0.6248996022779909550410346D-01 0.5739E-12 0.1169E-11 46 0.4999529437162436672219048D+00 0.6249038348500150007351923D-01 0.5940E-12 0.1194E-11 47 0.4999548949671460434946354D+00 0.6249078047410017571180685D-01 0.6175E-12 0.1226E-11 48 0.4999567275223771727791521D+00 0.6249115332711027176695932D-01 0.6246E-12 0.1245E-11 49 0.4999584508089198456948402D+00 0.6249150396389631947419380D-01 0.6350E-12 0.1284E-11 50 0.4999600733366308424902958D+00 0.6249183411702242683445893D-01 0.6540E-12 0.1326E-11 51 0.4999616028032252827289771D+00 0.6249214535327039419233590D-01 0.6685E-12 0.1348E-11 52 0.4999630461855068194929622D+00 0.6249243909232689722447384D-01 0.6833E-12 0.1353E-11 53 0.4999644098188647761106063D+00 0.6249271662305763778099856D-01 0.6881E-12 0.1394E-11 54 0.4999656994667312926320664D+00 0.6249297911771820532339798D-01 0.7250E-12 0.1435E-11 55 0.4999669203814216187436092D+00 0.6249322764439536743364059D-01 0.7394E-12 0.1487E-11 56 0.4999680773575577380887059D+00 0.6249346317792628229857515D-01 0.7605E-12 0.1537E-11 57 0.4999691747790906970560429D+00 0.6249368660950484618697944D-01 0.7849E-12 0.1558E-11 58 0.4999702166607832835623294D+00 0.6249389875515257757497028D-01 0.8002E-12 0.1587E-11 59 0.4999712066848864029133724D+00 0.6249410036320491421124313D-01 0.8028E-12 0.1620E-11 60 0.4999721482336350772391725D+00 0.6249429212094160952212189D-01 0.8178E-12 0.1633E-11 61 0.4999730444180997753474637D+00 0.6249447466047129329460356D-01 0.8343E-12 0.1668E-11 62 0.4999738981038527794413059D+00 0.6249464856396458721681804D-01 0.8517E-12 0.1695E-11 63 0.4999747119338450873618386D+00 0.6249481436831693346525225D-01 0.8597E-12 0.1721E-11 64 0.4999754883488349520402226D+00 0.6249497256931109198434623D-01 0.8824E-12 0.1744E-11 65 0.4999762296056629496953900D+00 0.6249512362533975202121856D-01 0.8994E-12 0.1781E-11 66 0.4999769377936291098983298D+00 0.6249526796074060874237548D-01 0.9227E-12 0.1829E-11 67 0.4999776148491940328687792D+00 0.6249540596878934803358105D-01 0.9325E-12 0.1860E-11 68 0.4999782625691971514359877D+00 0.6249553801439007314157062D-01 0.9452E-12 0.1897E-11 69 0.4999788826227606112748653D+00 0.6249566443649763920130830D-01 0.9476E-12 0.1913E-11 70 0.4999794765620260145278866D+00 0.6249578555030200582608385D-01 0.9682E-12 0.1913E-11 71 0.4999800458318529740903752D+00 0.6249590164920096536661457D-01 0.9844E-12 0.1949E-11 72 0.4999805917785926197341248D+00 0.6249601300658436449979864D-01 0.9974E-12 0.1986E-11 73 0.4999811156580355146816407D+00 0.6249611987745013348504999D-01 0.1004E-11 0.2012E-11 74 0.4999816186426215725898534D+00 0.6249622249987000685398710D-01 0.1023E-11 0.2040E-11 75 0.4999821018279892491294552D+00 0.6249632109632070766584596D-01 0.1038E-11 0.2049E-11 76 0.4999825662389322988704391D+00 0.6249641587489452932040333D-01 0.1041E-11 0.2084E-11 77 0.4999830128348245501653662D+00 0.6249650703040164580126188D-01 0.1051E-11 0.2112E-11 78 0.4999834425145662995407218D+00 0.6249659474537508048355780D-01 0.1067E-11 0.2132E-11 79 0.4999838561210999278064360D+00 0.6249667919098803752449566D-01 0.1091E-11 0.2186E-11 80 0.4999842544455370776022882D+00 0.6249676052789222470794015D-01 0.1096E-11 0.2212E-11 81 0.4999846382309351080952381D+00 0.6249683890698485223439219D-01 0.1110E-11 0.2213E-11 82 0.4999850081757564728418271D+00 0.6249691447011116104760201D-01 0.1103E-11 0.2225E-11 83 0.4999853649370410792162724D+00 0.6249698735070860204521348D-01 0.1126E-11 0.2252E-11 84 0.4999857091333185202026977D+00 0.6249705767439814119743096D-01 0.1142E-11 0.2259E-11 85 0.4999860413472842683019828D+00 0.6249712555952759423193690D-01 0.1158E-11 0.2315E-11 86 0.4999863621282614406895723D+00 0.6249719111767138868095742D-01 0.1172E-11 0.2357E-11 87 0.4999866719944675447181588D+00 0.6249725445409070255950143D-01 0.1195E-11 0.2380E-11 88 0.4999869714351036588750188D+00 0.6249731566815753068318073D-01 0.1217E-11 0.2411E-11 89 0.4999872609122817664443415D+00 0.6249737485374587551085453D-01 0.1224E-11 0.2431E-11 90 0.4999875408628044113852852D+00 0.6249743209959294408918089D-01 0.1237E-11 0.2457E-11 91 0.4999878116998094656880476D+00 0.6249748748963295155320773D-01 0.1256E-11 0.2484E-11 92 0.4999880738142915649907439D+00 0.6249754110330588066564603D-01 0.1275E-11 0.2518E-11 93 0.4999883275765106673134879D+00 0.6249759301584332253747359D-01 0.1287E-11 0.2561E-11 94 0.4999885733372972033418690D+00 0.6249764329853332288768545D-01 0.1299E-11 0.2604E-11 95 0.4999888114292624025921767D+00 0.6249769201896597827768467D-01 0.1316E-11 0.2640E-11 96 0.4999890421679215864606035D+00 0.6249773924126136533571248D-01 0.1342E-11 0.2654E-11 97 0.4999892658527375064523897D+00 0.6249778502628124099694122D-01 0.1338E-11 0.2677E-11 98 0.4999894827680901648832002D+00 0.6249782943182582140407308D-01 0.1358E-11 0.2713E-11 99 0.4999896931841789781887674D+00 0.6249787251281682973825635D-01 0.1370E-11 0.2724E-11 EAMAX = 0.1370E-11 AT 99 EBMAX = 0.2724E-11 AT 99 output of test2 with modmom=.false.: IERR IN CHEB = 0 IDERR IN DCHEB = 0 SIGMA = -0.5 K DALPHA(K) DBETA(K) 0 0.1111111111111111111111111D+00 0.4000000000000000000000000D+01 0.3553E-13 0.0000E+00 1 0.4661483641075477810171688D+00 0.2765432098765432098765432D-01 0.3357E-13 0.1536E-13 2 0.4880690581976426561739654D+00 0.5534292684170711183265476D-01 0.1840E-12 0.7715E-13 3 0.4938743419208057331274822D+00 0.5940526298488865183067045D-01 0.9937E-11 0.3398E-11 4 0.4962639578613459263700272D+00 0.6077714606674732893827292D-01 0.1655E-09 0.8674E-10 5 0.4974805136345470499404300D+00 0.6140371143126410746951331D-01 0.2156E-08 0.1195E-08 6 0.4981846424539394712820765D+00 0.6174167659202270796881237D-01 0.2514E-07 0.1601E-07 7 0.4986290336259843770623033D+00 0.6194453627914717711290500D-01 0.3179E-06 0.5731E-07 8 0.4989276082849235417170176D+00 0.6207576580933626143263374D-01 0.1141E-04 0.5484E-05 9 0.4991379564664850066978632D+00 0.6216550244588411847564971D-01 0.2493E-03 0.2412E-04 10 0.4992917697449966613224589D+00 0.6222955193630939619411773D-01 0.1796E-01 0.5439E-02 11 0.4994076708859141785874036D+00 0.6227685326078529901498445D-01 0.2488E+00 0.1747E+00 EAMAX = 0.2488E+00 AT 11 EBMAX = 0.1747E+00 AT 11 IERR IN CHEB = 0 IDERR IN DCHEB = 0 SIGMA = 0.0 K DALPHA(K) DBETA(K) 0 0.2500000000000000000000000D+00 0.1000000000000000000000000D+01 0.0000E+00 0.0000E+00 1 0.4642857142857142857142857D+00 0.4861111111111111111111111D-01 0.1399E-12 0.8120E-13 2 0.4854824464561713402517112D+00 0.5868480725623582766439909D-01 0.4162E-12 0.7607E-12 3 0.4921030818713608586050335D+00 0.6072858391891785822637764D-01 0.2480E-10 0.6712E-11 4 0.4950284987583539049494542D+00 0.6148202019693696071375090D-01 0.2065E-09 0.1833E-09 5 0.4965795116435580984519647D+00 0.6184080953188484218106874D-01 0.4201E-08 0.1170E-09 6 0.4975013013049582411833342D+00 0.6203906295445598496037927D-01 0.1529E-06 0.6217E-07 7 0.4980940182042518540528188D+00 0.6215991915828943043575570D-01 0.1328E-05 0.1085E-05 8 0.4984978019782527483786914D+00 0.6223893767166674446597530D-01 0.4341E-05 0.3757E-05 9 0.4987853226556929643922425D+00 0.6229338867990748397924422D-01 0.7116E-03 0.1396E-03 10 0.4989973531671538026838219D+00 0.6233247750665634351059939D-01 0.2907E-01 0.9942E-02 11 0.4991582216780211186850517D+00 0.6236147348381068365642941D-01 0.1285E+01 0.3185E+00 EAMAX = 0.1285E+01 AT 11 EBMAX = 0.3185E+00 AT 11 IERR IN CHEB = 0 IDERR IN DCHEB = 0 SIGMA = 0.5 K DALPHA(K) DBETA(K) 0 0.3600000000000000000000000D+00 0.4444444444444444444444444D+00 0.1816E-13 0.3553E-13 1 0.4719914117015566290928610D+00 0.5407346938775510204081633D-01 0.5269E-14 0.3203E-13 2 0.4879269724351617942679262D+00 0.5943841686774258104224939D-01 0.1572E-11 0.2603E-12 3 0.4932798327365417067423329D+00 0.6091940289441790471800010D-01 0.3833E-10 0.1769E-10 4 0.4957216320837135342773878D+00 0.6153509994700859144730956D-01 0.7452E-09 0.3279E-09 5 0.4970386426421355402434347D+00 0.6184950526468488541436694D-01 0.1313E-07 0.6570E-08 6 0.4978294203847389969826181D+00 0.6203162731630896597345843D-01 0.8069E-07 0.8362E-07 7 0.4983412074859196337339874D+00 0.6214656330041469428641795D-01 0.6524E-06 0.8737E-07 8 0.4986913480145008156327270D+00 0.6222375466280028997935600D-01 0.6011E-04 0.5188E-05 9 0.4989413835287815459221286D+00 0.6227810665498392806216766D-01 0.2939E-02 0.1009E-02 10 0.4991261249443934984780323D+00 0.6231782657996529563862926D-01 0.2045E-01 0.2423E-01 11 0.4992664682476756012406329D+00 0.6234773797508526141784543D-01 0.2179E+01 0.4710E+00 EAMAX = 0.2179E+01 AT 11 EBMAX = 0.4710E+00 AT 11 C-END-OF-FILE cat < test3.f c c program test3 c c dimension x(320),w(320),bexact(320),p0(320),p1(320),p2(320), *als(320),bes(320),all(320),bel(320) c c This test applies both the Stieltjes procedure (cf. Section 2.1 of c W. Gautschi, ``On generating orthogonal polynomials'', SIAM J. Sci. c Statist. Comput. 3, 1982, 289-317) and the Lanczos algorithm (cf. c W.B. Gragg and W.J. Harrod, ``The numerically stable reconstruction of c Jacobi matrices from spectral data'', Numer. Math. 44, 1984, 317-335) c to generate the N recursion coefficients, N = 40, 80, 160, 320, c for the (monic) orthogonal polynomials relative to the discrete inner c product supported on N equally spaced points on [-1,1] (including c the end points) and having equal weights 2/N. The routine prints the c absolute errors in the alpha-coefficients and the relative errors in c the beta-coefficients, these being computed using known formulae for c the coefficients. The maxima of these errors are also printed. c ncap=20 do 30 incap=1,4 ncap=2*ncap fncap=real(ncap) fncm1=real(ncap-1) c c Generate the abscissae and weights of the discrete inner product and c the exact beta-coefficients. c x(1)=-1. w(1)=2./fncap bexact(1)=2. do 10 k=2,ncap fkm1=real(k-1) x(k)=-1.+2.*fkm1/fncm1 w(k)=w(1) bexact(k)=(1.+1./fncm1)**2*(1.-(fkm1/fncap)**2)/ * (4.-(1./fkm1)**2) 10 continue c c Compute the desired coefficients, first by the Stieltjes procedure, c and then by the Lanczos algorithm. Indicate via the error flag ierrs c whether a critical underflow condition has arisen in Stieltjes's c procedure. (There may, in addition, occur harmless underflow, which c the routine sti does not test for.) c call sti(ncap,ncap,x,w,als,bes,ierrs,p0,p1,p2) call lancz(ncap,ncap,x,w,all,bel,ierrl,p0,p1) write(*,1) ierrs,ierrl 1 format(/5x,'ierr in sti = ',i4,11x,'ierr in lancz = ',i3/) c c Compute and print the absolute errors of the alpha-coefficients and c the relative errors of the beta-coefficients as well as the maximum c respective errors. c erralm=0. errblm=0. write(*,2) 2 format(5x,'k',4x,'erra',8x,'errb',10x,'erra',8x,'errb'/) do 20 in=1,ncap inm1=in-1 erras=abs(als(in)) errbs=abs((bes(in)-bexact(in))/bexact(in)) erral=abs(all(in)) errbl=abs((bel(in)-bexact(in))/bexact(in)) if(erral.gt.erralm) erralm=erral if(errbl.gt.errblm) errblm=errbl if(ierrs.eq.0 .or. inm1.lt.abs(ierrs)) then if(in.eq.1) then write(*,3) inm1,erras,errbs,erral,errbl,ncap 3 format(1x,i5,2e12.4,2x,2e12.4,' N =',i4) else write(*,4) inm1,erras,errbs,erral,errbl 4 format(1x,i5,2e12.4,2x,2e12.4) end if else if(in.eq.1) then write(*,5) inm1,erral,errbl,ncap 5 format(1x,i5,26x,2e12.4,' N =',i4) else write(*,6) inm1,erral,errbl 6 format(1x,i5,26x,2e12.4) end if end if 20 continue write(*,7) erralm,errblm 7 format(/32x,2e12.4//) 30 continue stop end C-END-OF-FILE cat < test3.out output of test3: IERR IN STI = 0 IERR IN LANCZ = 0 K ERRA ERRB ERRA ERRB 0 0.3908E-13 0.5684E-13 0.3131E-13 0.5684E-13 N = 40 1 0.2535E-13 0.6083E-13 0.8438E-14 0.1014E-13 2 0.3623E-13 0.3809E-13 0.1243E-13 0.2539E-13 3 0.8103E-13 0.1321E-13 0.2753E-13 0.0000E+00 4 0.8654E-13 0.4030E-13 0.1421E-13 0.2686E-13 5 0.1198E-12 0.2717E-13 0.1243E-13 0.2717E-13 6 0.1240E-12 0.2745E-13 0.6217E-13 0.2745E-13 7 0.1308E-12 0.4159E-13 0.5329E-13 0.1386E-13 8 0.1405E-12 0.0000E+00 0.1066E-13 0.5607E-13 9 0.1482E-12 0.1419E-13 0.1776E-13 0.5674E-13 10 0.1169E-12 0.2156E-13 0.3197E-13 0.1581E-12 11 0.1733E-12 0.2917E-13 0.2132E-13 0.9480E-13 12 0.1479E-12 0.2964E-13 0.2132E-13 0.3705E-13 13 0.1575E-12 0.1508E-13 0.1776E-13 0.8295E-13 14 0.1353E-12 0.1538E-13 0.1776E-13 0.1230E-12 15 0.1879E-12 0.1570E-13 0.1066E-13 0.1413E-12 16 0.1409E-12 0.3213E-13 0.2842E-13 0.8033E-13 17 0.1570E-12 0.3295E-13 0.7105E-13 0.1318E-12 18 0.1537E-12 0.5078E-13 0.7105E-14 0.8463E-13 19 0.1376E-12 0.3487E-13 0.2132E-13 0.1743E-13 20 0.1555E-12 0.1800E-13 0.0000E+00 0.6300E-13 21 0.1704E-12 0.9319E-14 0.7105E-14 0.6524E-13 22 0.1192E-12 0.7743E-13 0.6395E-13 0.1742E-12 23 0.1540E-12 0.2017E-13 0.2132E-13 0.2017E-12 24 0.1162E-12 0.4220E-13 0.2132E-13 0.3165E-13 25 0.1905E-12 0.4432E-13 0.7105E-13 0.8864E-13 26 0.1479E-12 0.1403E-12 0.4263E-13 0.2221E-12 27 0.1492E-12 0.1240E-12 0.3553E-13 0.4961E-13 28 0.1345E-12 0.7944E-13 0.1421E-13 0.1589E-12 29 0.1286E-12 0.1139E-12 0.5684E-13 0.2847E-13 30 0.1411E-12 0.6174E-13 0.2132E-13 0.3087E-13 31 0.1581E-12 0.6763E-13 0.1137E-12 0.1691E-12 32 0.1571E-12 0.0000E+00 0.8527E-13 0.2814E-13 33 0.1654E-12 0.3172E-13 0.1066E-12 0.9515E-13 34 0.1755E-12 0.2434E-13 0.5684E-13 0.1095E-12 35 0.1043E-14 0.7780E-12 0.6395E-13 0.2233E-12 36 0.3011E-11 0.1480E-10 0.9237E-13 0.7997E-13 37 0.6933E-10 0.3550E-09 0.1208E-12 0.2339E-13 38 0.2569E-08 0.1295E-07 0.7816E-13 0.3377E-12 39 0.1927E-06 0.9582E-06 0.1421E-12 0.7694E-13 0.1421E-12 0.3377E-12 IERR IN STI = 0 IERR IN LANCZ = 0 K ERRA ERRB ERRA ERRB 0 0.7594E-13 0.1990E-12 0.5107E-14 0.1990E-12 N = 80 1 0.2761E-13 0.2079E-13 0.9992E-14 0.2079E-13 2 0.6300E-13 0.1300E-13 0.5507E-13 0.3900E-13 3 0.1117E-12 0.2698E-13 0.1332E-14 0.4048E-13 4 0.7493E-13 0.6838E-13 0.6395E-13 0.1368E-13 5 0.7262E-13 0.4132E-13 0.1332E-13 0.2755E-13 6 0.4305E-13 0.2768E-13 0.5151E-13 0.2768E-13 7 0.9320E-13 0.6947E-13 0.5151E-13 0.2779E-13 8 0.1013E-12 0.1394E-13 0.5684E-13 0.5577E-13 9 0.1317E-12 0.4198E-13 0.6928E-13 0.4198E-13 10 0.1287E-12 0.4213E-13 0.4441E-13 0.4213E-13 11 0.1523E-12 0.2819E-13 0.5329E-13 0.1128E-12 12 0.1299E-12 0.4246E-13 0.6573E-13 0.1132E-12 13 0.1786E-12 0.1421E-13 0.1066E-13 0.8528E-13 14 0.1503E-12 0.2855E-13 0.6395E-13 0.1785E-12 15 0.1524E-12 0.1435E-13 0.7105E-13 0.7173E-13 16 0.1394E-12 0.7211E-13 0.2487E-13 0.7211E-13 17 0.1020E-12 0.5800E-13 0.6040E-13 0.7975E-13 18 0.1144E-12 0.0000E+00 0.2842E-13 0.1459E-12 19 0.1488E-12 0.4403E-13 0.7105E-14 0.1468E-12 20 0.1256E-12 0.4432E-13 0.5684E-13 0.1699E-12 21 0.1715E-12 0.2975E-13 0.3553E-14 0.1190E-12 22 0.9435E-13 0.1498E-13 0.2487E-13 0.2547E-12 23 0.1822E-12 0.4530E-13 0.1421E-13 0.2114E-12 24 0.9707E-13 0.4567E-13 0.4974E-13 0.7611E-13 25 0.8218E-13 0.1228E-12 0.6040E-13 0.3070E-13 26 0.5841E-13 0.4647E-13 0.5684E-13 0.1084E-12 27 0.8693E-13 0.7035E-13 0.3553E-14 0.1798E-12 28 0.3460E-13 0.4736E-13 0.2842E-13 0.1737E-12 29 0.1860E-13 0.4785E-13 0.7816E-13 0.1037E-12 30 0.5408E-13 0.1128E-12 0.1172E-12 0.2418E-13 31 0.2425E-14 0.9781E-13 0.3197E-13 0.1141E-12 32 0.1965E-13 0.8247E-13 0.4974E-13 0.4123E-13 33 0.4281E-13 0.4174E-13 0.3197E-13 0.2588E-12 34 0.1753E-13 0.6764E-13 0.3553E-13 0.1522E-12 35 0.5964E-13 0.8567E-13 0.0000E+00 0.1371E-12 36 0.3968E-13 0.8687E-13 0.7816E-13 0.2345E-12 37 0.8559E-15 0.1763E-13 0.5329E-13 0.1586E-12 38 0.3179E-13 0.0000E+00 0.4974E-13 0.4473E-13 39 0.2322E-13 0.1090E-12 0.1350E-12 0.1272E-12 40 0.2187E-13 0.3695E-13 0.0000E+00 0.2679E-12 41 0.3747E-13 0.5637E-13 0.1066E-12 0.1221E-12 42 0.1512E-13 0.2869E-13 0.2132E-13 0.1722E-12 43 0.9982E-13 0.5846E-13 0.3553E-13 0.1267E-12 44 0.9085E-13 0.2980E-13 0.7816E-13 0.9933E-14 45 0.9285E-13 0.4054E-13 0.6395E-13 0.1926E-12 46 0.1705E-12 0.8280E-13 0.2132E-13 0.2070E-13 47 0.1271E-12 0.2539E-12 0.3553E-13 0.1693E-12 48 0.1090E-12 0.3248E-13 0.9948E-13 0.2598E-12 49 0.2031E-12 0.1996E-12 0.2842E-13 0.4435E-13 50 0.1220E-12 0.1137E-13 0.7105E-13 0.2501E-12 51 0.1140E-12 0.1050E-12 0.8527E-13 0.2101E-12 52 0.2040E-12 0.1560E-12 0.6395E-13 0.0000E+00 53 0.1039E-12 0.6915E-12 0.6395E-13 0.1235E-12 54 0.1360E-11 0.3207E-11 0.9948E-13 0.1400E-12 55 0.6351E-11 0.1665E-10 0.1066E-12 0.1445E-12 56 0.3559E-10 0.8980E-10 0.7816E-13 0.3532E-12 57 0.2038E-09 0.5128E-09 0.1137E-12 0.1407E-12 58 0.1235E-08 0.3080E-08 0.1137E-12 0.6280E-12 59 0.7900E-08 0.1955E-07 0.1990E-12 0.9874E-13 60 0.5346E-07 0.1313E-06 0.1421E-13 0.1584E-13 61 0.3838E-06 0.9350E-06 0.1066E-12 0.4469E-12 62 0.2930E-05 0.7085E-05 0.9237E-13 0.6939E-13 63 0.2387E-04 0.5728E-04 0.7105E-13 0.1550E-12 64 0.2080E-03 0.4958E-03 0.1847E-12 0.3272E-12 65 0.1938E-02 0.4608E-02 0.1066E-12 0.3568E-12 66 0.1855E-01 0.4598E-01 0.1634E-12 0.1302E-12 67 0.1250E+00 0.4714E+00 0.9237E-13 0.1276E-12 68 0.1102E+00 0.3369E+01 0.1634E-12 0.3745E-13 69 0.1866E+00 0.6137E+01 0.2274E-12 0.4058E-12 70 0.6277E-01 0.2225E+01 0.1776E-12 0.1848E-12 71 0.5904E-02 0.4584E+00 0.1492E-12 0.8973E-13 72 0.5405E-03 0.3000E+00 0.2061E-12 0.4102E-12 73 0.1226E-01 0.5107E+00 0.1634E-12 0.6625E-12 74 0.4554E-01 0.3392E+01 0.1918E-12 0.1320E-12 75 0.3479E-01 0.1663E+02 0.2061E-12 0.2861E-13 76 0.2243E-01 0.9311E+01 0.1918E-12 0.1421E-12 77 0.1679E-02 0.2201E+01 0.2274E-12 0.5649E-12 78 0.8671E-03 0.2154E+01 0.2132E-12 0.4999E-12 79 0.1949E-01 0.4324E+01 0.1990E-12 0.4358E-12 0.2274E-12 0.6625E-12 IERR IN STI = 0 IERR IN LANCZ = 0 K ERRA ERRB ERRA ERRB 0 0.1369E-12 0.5542E-12 0.5534E-13 0.5542E-12 N = 160 1 0.4309E-13 0.1474E-12 0.1117E-12 0.1263E-12 2 0.1221E-12 0.7895E-13 0.1310E-12 0.2763E-12 3 0.1799E-12 0.2730E-13 0.6217E-13 0.1365E-12 4 0.1855E-12 0.4147E-13 0.1226E-12 0.1935E-12 5 0.2261E-12 0.1391E-13 0.1341E-12 0.1530E-12 6 0.1767E-12 0.2791E-13 0.1394E-12 0.2652E-12 7 0.1717E-12 0.5596E-13 0.9948E-13 0.2098E-12 8 0.1561E-12 0.5606E-13 0.1332E-12 0.1401E-12 9 0.1568E-12 0.1403E-13 0.9681E-13 0.1684E-12 10 0.1322E-12 0.5621E-13 0.1013E-12 0.1124E-12 11 0.1320E-12 0.2814E-13 0.8971E-13 0.1689E-12 12 0.1049E-12 0.9862E-13 0.9059E-13 0.1268E-12 13 0.1657E-12 0.1411E-13 0.1137E-12 0.1270E-12 14 0.1793E-12 0.4237E-13 0.1155E-12 0.2542E-12 15 0.2089E-12 0.1131E-12 0.5862E-13 0.1273E-12 16 0.1639E-12 0.2832E-13 0.1013E-12 0.8497E-13 17 0.2053E-12 0.7091E-13 0.1226E-12 0.2127E-12 18 0.1885E-12 0.1420E-13 0.5151E-13 0.1988E-12 19 0.1807E-12 0.0000E+00 0.7283E-13 0.1138E-12 20 0.1511E-12 0.1425E-13 0.9592E-13 0.2066E-12 21 0.1607E-12 0.7136E-13 0.9415E-13 0.1499E-12 22 0.1297E-12 0.2859E-13 0.3375E-13 0.1930E-12 23 0.1641E-12 0.5729E-13 0.1208E-12 0.2292E-12 24 0.1731E-12 0.1435E-13 0.1155E-12 0.2153E-12 25 0.1601E-12 0.2876E-13 0.8882E-13 0.1726E-12 26 0.1589E-12 0.8645E-13 0.8527E-13 0.1513E-12 27 0.1577E-12 0.2888E-13 0.5684E-13 0.1300E-12 28 0.1555E-12 0.7236E-13 0.1279E-12 0.1158E-12 29 0.1792E-12 0.1451E-13 0.4263E-13 0.2103E-12 30 0.1798E-12 0.1454E-13 0.6040E-13 0.2545E-12 31 0.2640E-12 0.1020E-12 0.9948E-13 0.2041E-12 32 0.2069E-12 0.1461E-13 0.4974E-13 0.2777E-12 33 0.2980E-12 0.7327E-13 0.2842E-13 0.3224E-12 34 0.1956E-12 0.4408E-13 0.5329E-13 0.4114E-12 35 0.2378E-12 0.7368E-13 0.3908E-13 0.2726E-12 36 0.1596E-12 0.1478E-13 0.9592E-13 0.2439E-12 37 0.1943E-12 0.2965E-13 0.9592E-13 0.2520E-12 38 0.1559E-12 0.7435E-13 0.1243E-12 0.1710E-12 39 0.1540E-12 0.5967E-13 0.1172E-12 0.2088E-12 40 0.1832E-12 0.1497E-12 0.1137E-12 0.2021E-12 41 0.1610E-12 0.1502E-13 0.6395E-13 0.2027E-12 42 0.1478E-12 0.7535E-13 0.1030E-12 0.1055E-12 43 0.1723E-12 0.0000E+00 0.1030E-12 0.3252E-12 44 0.1086E-12 0.4554E-13 0.7105E-14 0.3491E-12 45 0.1581E-12 0.7619E-13 0.2842E-13 0.3200E-12 46 0.3900E-13 0.7648E-13 0.8527E-13 0.3901E-12 47 0.1063E-12 0.3071E-13 0.7105E-13 0.2995E-12 48 0.4257E-13 0.1542E-13 0.7816E-13 0.1388E-12 49 0.2807E-13 0.3097E-13 0.1066E-12 0.2168E-12 50 0.8672E-13 0.1244E-12 0.7105E-13 0.2177E-12 51 0.8281E-13 0.7029E-13 0.9592E-13 0.1250E-12 52 0.1009E-12 0.4707E-13 0.1279E-12 0.3766E-12 53 0.1102E-12 0.1576E-13 0.1421E-13 0.2207E-12 54 0.7475E-14 0.0000E+00 0.1386E-12 0.3167E-12 55 0.1456E-12 0.1273E-12 0.7105E-14 0.3978E-12 56 0.5236E-13 0.9595E-13 0.1030E-12 0.3438E-12 57 0.6598E-13 0.4822E-13 0.2842E-13 0.2089E-12 58 0.1179E-12 0.3231E-13 0.9948E-13 0.3231E-12 59 0.4326E-13 0.1462E-12 0.4263E-13 0.4060E-13 60 0.3378E-13 0.4899E-13 0.5329E-13 0.3184E-12 61 0.7701E-13 0.8210E-13 0.8527E-13 0.2381E-12 62 0.3615E-13 0.1404E-12 0.3908E-13 0.3550E-12 63 0.2169E-13 0.6643E-13 0.1066E-13 0.4318E-12 64 0.2138E-13 0.1671E-13 0.4974E-13 0.2005E-12 65 0.6233E-14 0.1176E-12 0.4974E-13 0.2017E-12 66 0.4147E-13 0.5073E-13 0.1457E-12 0.2114E-12 67 0.4050E-13 0.1021E-12 0.2842E-13 0.7658E-13 68 0.8230E-13 0.1713E-13 0.7105E-14 0.4025E-12 69 0.5943E-13 0.1379E-12 0.3553E-13 0.3965E-12 70 0.1979E-13 0.1735E-13 0.5329E-13 0.4078E-12 71 0.2508E-13 0.1747E-13 0.3553E-14 0.2446E-12 72 0.1891E-13 0.1760E-12 0.7105E-13 0.1848E-12 73 0.1335E-13 0.1506E-12 0.1066E-12 0.1418E-12 74 0.1925E-13 0.1250E-12 0.4263E-13 0.2499E-12 75 0.6658E-13 0.2518E-12 0.5329E-13 0.4676E-12 76 0.5973E-13 0.7611E-12 0.1421E-13 0.4621E-12 77 0.3177E-12 0.2484E-11 0.1208E-12 0.6392E-13 78 0.6944E-12 0.7105E-11 0.1421E-13 0.2301E-12 79 0.2036E-11 0.1991E-10 0.4974E-13 0.1856E-12 80 0.5597E-11 0.5759E-10 0.3553E-13 0.4116E-12 81 0.1736E-10 0.1707E-09 0.7105E-13 0.5661E-12 82 0.5229E-10 0.5152E-09 0.5684E-13 0.3521E-12 83 0.1612E-09 0.1579E-08 0.1137E-12 0.9600E-13 84 0.5049E-09 0.4928E-08 0.9237E-13 0.3003E-12 85 0.1611E-08 0.1565E-07 0.2842E-13 0.4008E-12 86 0.5231E-08 0.5060E-07 0.7105E-14 0.2072E-12 87 0.1729E-07 0.1665E-06 0.3553E-13 0.9962E-13 88 0.5822E-07 0.5582E-06 0.5684E-13 0.9054E-13 89 0.1996E-06 0.1906E-05 0.7105E-13 0.3759E-12 90 0.6970E-06 0.6627E-05 0.1279E-12 0.4722E-12 91 0.2480E-05 0.2348E-04 0.8527E-13 0.1556E-12 92 0.8989E-05 0.8475E-04 0.7816E-13 0.1048E-12 93 0.3320E-04 0.3118E-03 0.6395E-13 0.2649E-12 94 0.1248E-03 0.1169E-02 0.7105E-14 0.3322E-12 95 0.4756E-03 0.4465E-02 0.5684E-13 0.2384E-12 96 0.1809E-02 0.1731E-01 0.4263E-13 0.1973E-12 97 0.6465E-02 0.6727E-01 0.2842E-13 0.3217E-12 98 0.1754E-01 0.2497E+00 0.9948E-13 0.6401E-12 99 0.1916E-01 0.7559E+00 0.1208E-12 0.3525E-12 100 0.1121E-01 0.1334E+01 0.9948E-13 0.3454E-13 101 0.2148E-01 0.1050E+01 0.0000E+00 0.4083E-12 102 0.9467E-02 0.4333E+00 0.1421E-13 0.7092E-13 103 0.2640E-02 0.1512E+00 0.1776E-12 0.5632E-12 104 0.6394E-03 0.7080E-01 0.1492E-12 0.3281E-12 105 0.1578E-03 0.5210E-01 0.2416E-12 0.4190E-12 106 0.8389E-04 0.5132E-01 0.5684E-13 0.2001E-12 107 0.2277E-03 0.6544E-01 0.1634E-12 0.2539E-13 108 0.8852E-03 0.1302E+00 0.1705E-12 0.3480E-12 109 0.2496E-02 0.3961E+00 0.2345E-12 0.1964E-12 110 0.2010E-02 0.1171E+01 0.1350E-12 0.3593E-12 111 0.2362E-02 0.1847E+01 0.0000E+00 0.1488E-12 112 0.2353E-02 0.1158E+01 0.3126E-12 0.2064E-12 113 0.7496E-03 0.4214E+00 0.1421E-12 0.2380E-12 114 0.1483E-03 0.1782E+00 0.6395E-13 0.3990E-12 115 0.7073E-04 0.1231E+00 0.2132E-12 0.7693E-12 116 0.5116E-03 0.1136E+00 0.1563E-12 0.1257E-12 117 0.2610E-02 0.1165E+00 0.1705E-12 0.5354E-12 118 0.1323E-01 0.1348E+00 0.2558E-12 0.2846E-12 119 0.6179E-01 0.2218E+00 0.1918E-12 0.8637E-13 120 0.1906E+00 0.5899E+00 0.1563E-12 0.5212E-12 121 0.1921E+00 0.1315E+01 0.1918E-12 0.2131E-12 122 0.7564E-01 0.1399E+01 0.2913E-12 0.1928E-12 123 0.2267E+00 0.1500E+01 0.1705E-12 0.4889E-12 124 0.1100E+00 0.1033E+01 0.2416E-12 0.1581E-12 125 0.2485E-01 0.4281E+00 0.3482E-12 0.1891E-12 126 0.1172E-02 0.2578E+00 0.2558E-12 0.4156E-12 127 0.1956E-01 0.2587E+00 0.2061E-12 0.4647E-12 128 0.9886E-01 0.4369E+00 0.2487E-12 0.2047E-12 129 0.2286E+00 0.1215E+01 0.2771E-12 0.5313E-12 130 0.3600E-01 0.2257E+01 0.2487E-12 0.3510E-12 131 0.2409E+00 0.2500E+01 0.2913E-12 0.5428E-12 132 0.1331E+00 0.1778E+01 0.1705E-12 0.2197E-12 133 0.2208E-01 0.6996E+00 0.3695E-12 0.5222E-12 134 0.2500E-01 0.4837E+00 0.2842E-12 0.4935E-12 135 0.1337E+00 0.8253E+00 0.3268E-12 0.3653E-13 136 0.1861E+00 0.2344E+01 0.3197E-12 0.3540E-12 137 0.1238E+00 0.3737E+01 0.4405E-12 0.3813E-12 138 0.1738E+00 0.3150E+01 0.2558E-12 0.5206E-12 139 0.4399E-01 0.1324E+01 0.3553E-12 0.1502E-12 140 0.7516E-02 0.7148E+00 0.3766E-12 0.5464E-12 141 0.7372E-02 0.7454E+00 0.3979E-12 0.7852E-14 142 0.2973E-01 0.1568E+01 0.3340E-12 0.4791E-12 143 0.1711E-01 0.5203E+01 0.3126E-12 0.4098E-12 144 0.3070E-01 0.6941E+01 0.3411E-12 0.7386E-13 145 0.1241E-01 0.2796E+01 0.3340E-12 0.1963E-12 146 0.4335E-02 0.1265E+01 0.1847E-12 0.6185E-12 147 0.1962E-01 0.1198E+01 0.3268E-12 0.3376E-12 148 0.1032E+00 0.2181E+01 0.3055E-12 0.2309E-12 149 0.7722E-01 0.7277E+01 0.4405E-12 0.1982E-12 150 0.1301E+00 0.1132E+02 0.2984E-12 0.2028E-12 151 0.5329E-01 0.5409E+01 0.2984E-12 0.6418E-13 152 0.8686E-02 0.2511E+01 0.4263E-12 0.4588E-12 153 0.1511E-01 0.2502E+01 0.4192E-12 0.7174E-13 154 0.8164E-01 0.4930E+01 0.3979E-12 0.6078E-12 155 0.3521E-01 0.1905E+02 0.3837E-12 0.1996E-12 156 0.9120E-01 0.2870E+02 0.4832E-12 0.8260E-12 157 0.2416E-01 0.1319E+02 0.3908E-12 0.1393E-11 158 0.1788E-02 0.1023E+02 0.4050E-12 0.1412E-11 159 0.6698E-02 0.2500E+02 0.3837E-12 0.2173E-11 0.4832E-12 0.2173E-11 IERR IN STI = 0 IERR IN LANCZ = 0 K ERRA ERRB ERRA ERRB 0 0.2566E-12 0.7390E-12 0.2201E-13 0.7390E-12 N = 320 1 0.3856E-13 0.1271E-12 0.2881E-13 0.1907E-12 2 0.1457E-12 0.1589E-12 0.6439E-14 0.1059E-12 3 0.1618E-12 0.1098E-12 0.3342E-13 0.6866E-13 4 0.1589E-12 0.5561E-13 0.1799E-13 0.4171E-13 5 0.2169E-12 0.2797E-13 0.3775E-14 0.4195E-13 6 0.2070E-12 0.4209E-13 0.1124E-12 0.1543E-12 7 0.2846E-12 0.1406E-13 0.3109E-13 0.1406E-12 8 0.2381E-12 0.4223E-13 0.1128E-12 0.7038E-13 9 0.2212E-12 0.9863E-13 0.1212E-12 0.2254E-12 10 0.1780E-12 0.7050E-13 0.1186E-12 0.2961E-12 11 0.2168E-12 0.1411E-13 0.1386E-12 0.1693E-12 12 0.2579E-12 0.2824E-13 0.1306E-12 0.2118E-12 13 0.2671E-12 0.1412E-13 0.9059E-13 0.1836E-12 14 0.2539E-12 0.5652E-13 0.2203E-12 0.2120E-12 15 0.2187E-12 0.1414E-13 0.1821E-12 0.2403E-12 16 0.2482E-12 0.1273E-12 0.1901E-12 0.2546E-12 17 0.2325E-12 0.1415E-13 0.1954E-12 0.2547E-12 18 0.2729E-12 0.7078E-13 0.1199E-12 0.2123E-12 19 0.3105E-12 0.4249E-13 0.8171E-13 0.2691E-12 20 0.2641E-12 0.4251E-13 0.1696E-12 0.2409E-12 21 0.2684E-12 0.1418E-13 0.1652E-12 0.3402E-12 22 0.2327E-12 0.5673E-13 0.1350E-12 0.3262E-12 23 0.2881E-12 0.1419E-13 0.1545E-12 0.9932E-13 24 0.3512E-12 0.8518E-13 0.1492E-12 0.2413E-12 25 0.3729E-12 0.2841E-13 0.1865E-12 0.3835E-12 26 0.3644E-12 0.4263E-13 0.1741E-12 0.3553E-12 27 0.3784E-12 0.1422E-13 0.1670E-12 0.2915E-12 28 0.2932E-12 0.2845E-13 0.1563E-12 0.4410E-12 29 0.3716E-12 0.4270E-13 0.1190E-12 0.3986E-12 30 0.3184E-12 0.4273E-13 0.1066E-12 0.3418E-12 31 0.3554E-12 0.0000E+00 0.1652E-12 0.3634E-12 32 0.3427E-12 0.4278E-13 0.2078E-12 0.3351E-12 33 0.3642E-12 0.8562E-13 0.1901E-12 0.3782E-12 34 0.3042E-12 0.4284E-13 0.1243E-12 0.3713E-12 35 0.3650E-12 0.1429E-13 0.1368E-12 0.4644E-12 36 0.3122E-12 0.2860E-13 0.1510E-12 0.4004E-12 37 0.3881E-12 0.5724E-13 0.1403E-12 0.3506E-12 38 0.4116E-12 0.1003E-12 0.1990E-12 0.4153E-12 39 0.4442E-12 0.2867E-13 0.1599E-12 0.4156E-12 40 0.3686E-12 0.2869E-13 0.1723E-12 0.4016E-12 41 0.4777E-12 0.1436E-12 0.8527E-13 0.5240E-12 42 0.4978E-12 0.2874E-13 0.2345E-12 0.3592E-12 43 0.4805E-12 0.2876E-13 0.1883E-12 0.4314E-12 44 0.4474E-12 0.0000E+00 0.1226E-12 0.4030E-12 45 0.5007E-12 0.7203E-13 0.1261E-12 0.5474E-12 46 0.5063E-12 0.7209E-13 0.2540E-12 0.3172E-12 47 0.4799E-12 0.1010E-12 0.2043E-12 0.4474E-12 48 0.4600E-12 0.1445E-13 0.1386E-12 0.3539E-12 49 0.5447E-12 0.1157E-12 0.8882E-13 0.3904E-12 50 0.4711E-12 0.8684E-13 0.1599E-12 0.3908E-12 51 0.5023E-12 0.4347E-13 0.1990E-12 0.3622E-12 52 0.4617E-12 0.4351E-13 0.1315E-12 0.5076E-12 53 0.5553E-12 0.4356E-13 0.1705E-12 0.3630E-12 54 0.5315E-12 0.1453E-13 0.2558E-12 0.4869E-12 55 0.5099E-12 0.1019E-12 0.1172E-12 0.3710E-12 56 0.4492E-12 0.1457E-13 0.2416E-12 0.4370E-12 57 0.4694E-12 0.2917E-13 0.1386E-12 0.5761E-12 58 0.4206E-12 0.7300E-13 0.1883E-12 0.2701E-12 59 0.5010E-12 0.1462E-13 0.1421E-12 0.4824E-12 60 0.4942E-12 0.8781E-13 0.1741E-12 0.4610E-12 61 0.5301E-12 0.5861E-13 0.2025E-12 0.3810E-12 62 0.5374E-12 0.5869E-13 0.1705E-12 0.4035E-12 63 0.5335E-12 0.5876E-13 0.1599E-12 0.3452E-12 64 0.4767E-12 0.4413E-13 0.1563E-12 0.5884E-12 65 0.5259E-12 0.7365E-13 0.1457E-12 0.4861E-12 66 0.5073E-12 0.1180E-12 0.2487E-12 0.5678E-12 67 0.5065E-12 0.4431E-13 0.1847E-12 0.5021E-12 68 0.5789E-12 0.0000E+00 0.2132E-12 0.2662E-12 69 0.4738E-12 0.1333E-12 0.1954E-12 0.4221E-12 70 0.4615E-12 0.4449E-13 0.1634E-12 0.4153E-12 71 0.5355E-12 0.2971E-13 0.2380E-12 0.3713E-12 72 0.4823E-12 0.2975E-13 0.1990E-12 0.4983E-12 73 0.5229E-12 0.5959E-13 0.1741E-12 0.5586E-12 74 0.5034E-12 0.5968E-13 0.1492E-12 0.4998E-12 75 0.5143E-12 0.4483E-13 0.1918E-12 0.5529E-12 76 0.4984E-12 0.4490E-13 0.1492E-12 0.3816E-12 77 0.5809E-12 0.8994E-13 0.1279E-12 0.5546E-12 78 0.5374E-12 0.0000E+00 0.2736E-12 0.4204E-12 79 0.5850E-12 0.1504E-13 0.1847E-12 0.2857E-12 80 0.6285E-12 0.1506E-13 0.1315E-12 0.6025E-12 81 0.6474E-12 0.3018E-13 0.1315E-12 0.5055E-12 82 0.7007E-12 0.1511E-13 0.2096E-12 0.6348E-12 83 0.6948E-12 0.0000E+00 0.2096E-12 0.3785E-12 84 0.7359E-12 0.1062E-12 0.2451E-12 0.2806E-12 85 0.7558E-12 0.2431E-12 0.2913E-12 0.4786E-12 86 0.7765E-12 0.0000E+00 0.1172E-12 0.4795E-12 87 0.7890E-12 0.1067E-12 0.2132E-12 0.4193E-12 88 0.8332E-12 0.1528E-13 0.2416E-12 0.4736E-12 89 0.7221E-12 0.1071E-12 0.2380E-12 0.3444E-12 90 0.7170E-12 0.2300E-13 0.1243E-12 0.5137E-12 91 0.7478E-12 0.1690E-12 0.8527E-13 0.6914E-12 92 0.7624E-12 0.7697E-13 0.8171E-13 0.5157E-12 93 0.7241E-12 0.7712E-13 0.2807E-12 0.4782E-12 94 0.6748E-12 0.1082E-12 0.2025E-12 0.4250E-12 95 0.7693E-12 0.1084E-12 0.1954E-12 0.5730E-12 96 0.7028E-12 0.7759E-13 0.4263E-13 0.5664E-12 97 0.7830E-12 0.6220E-13 0.1954E-12 0.7620E-12 98 0.6610E-12 0.1714E-12 0.2132E-13 0.6467E-12 99 0.7525E-12 0.1562E-12 0.1634E-12 0.7418E-12 100 0.7651E-12 0.4695E-13 0.1776E-12 0.3834E-12 101 0.8318E-12 0.9411E-13 0.2061E-12 0.4862E-12 102 0.7379E-12 0.3144E-13 0.2167E-12 0.4637E-12 103 0.8647E-12 0.3151E-13 0.1279E-12 0.7089E-12 104 0.7160E-12 0.9474E-13 0.9592E-13 0.8053E-12 105 0.8593E-12 0.1662E-12 0.2203E-12 0.2136E-12 106 0.5405E-12 0.2062E-12 0.6395E-13 0.6821E-12 107 0.1054E-11 0.5883E-12 0.2416E-12 0.5485E-12 108 0.1230E-12 0.1227E-11 0.1315E-12 0.5419E-12 109 0.2077E-11 0.2364E-11 0.1172E-12 0.6390E-12 110 0.1670E-11 0.4788E-11 0.1101E-12 0.6085E-12 111 0.5628E-11 0.9736E-11 0.1741E-12 0.5619E-12 112 0.9267E-11 0.1979E-10 0.2096E-12 0.7162E-12 113 0.2139E-10 0.4066E-10 0.1137E-12 0.5566E-12 114 0.4186E-10 0.8422E-10 0.1883E-12 0.1860E-12 115 0.8972E-10 0.1748E-09 0.1350E-12 0.4541E-12 116 0.1860E-09 0.3661E-09 0.2132E-12 0.4308E-12 117 0.3959E-09 0.7728E-09 0.1457E-12 0.7825E-12 118 0.8418E-09 0.1643E-08 0.1528E-12 0.7600E-12 119 0.1810E-08 0.3519E-08 0.1847E-12 0.6801E-12 120 0.3913E-08 0.7593E-08 0.1101E-12 0.5012E-12 121 0.8530E-08 0.1651E-07 0.1776E-13 0.9392E-12 122 0.1873E-07 0.3616E-07 0.2736E-12 0.5040E-12 123 0.4143E-07 0.7979E-07 0.2061E-12 0.3231E-12 124 0.9235E-07 0.1774E-06 0.1243E-12 0.6148E-12 125 0.2074E-06 0.3974E-06 0.2913E-12 0.3000E-12 126 0.4692E-06 0.8968E-06 0.1776E-13 0.8273E-12 127 0.1070E-05 0.2039E-05 0.1315E-12 0.3185E-12 128 0.2457E-05 0.4673E-05 0.1599E-12 0.8238E-12 129 0.5686E-05 0.1079E-04 0.1137E-12 0.5902E-12 130 0.1326E-04 0.2510E-04 0.1812E-12 0.6681E-12 131 0.3115E-04 0.5883E-04 0.2167E-12 0.2884E-12 132 0.7373E-04 0.1390E-03 0.1812E-12 0.5275E-12 133 0.1758E-03 0.3307E-03 0.1457E-12 0.5463E-12 134 0.4219E-03 0.7925E-03 0.8882E-13 0.4110E-12 135 0.1018E-02 0.1912E-02 0.8882E-13 0.6958E-12 136 0.2457E-02 0.4633E-02 0.1101E-12 0.8359E-12 137 0.5886E-02 0.1124E-01 0.7105E-13 0.5793E-12 138 0.1368E-01 0.2699E-01 0.2487E-13 0.6159E-12 139 0.2936E-01 0.6271E-01 0.1457E-12 0.6005E-12 140 0.5240E-01 0.1341E+00 0.1421E-13 0.7859E-12 141 0.6454E-01 0.2423E+00 0.5329E-13 0.7798E-12 142 0.3586E-01 0.3416E+00 0.1030E-12 0.5891E-12 143 0.2434E-01 0.3843E+00 0.1172E-12 0.6000E-12 144 0.6371E-01 0.3695E+00 0.3908E-13 0.6286E-12 145 0.5790E-01 0.2868E+00 0.0000E+00 0.4976E-12 146 0.3372E-01 0.1731E+00 0.6395E-13 0.4904E-12 147 0.1560E-01 0.9012E-01 0.7461E-13 0.7249E-12 148 0.6485E-02 0.4743E-01 0.9237E-13 0.6647E-12 149 0.2611E-02 0.2896E-01 0.8171E-13 0.5680E-12 150 0.1147E-02 0.2180E-01 0.1279E-12 0.4615E-12 151 0.8015E-03 0.1979E-01 0.1386E-12 0.4633E-12 152 0.1248E-02 0.2101E-01 0.2132E-13 0.4650E-12 153 0.2896E-02 0.2662E-01 0.5684E-13 0.5401E-12 154 0.7139E-02 0.4201E-01 0.1066E-13 0.5330E-12 155 0.1649E-01 0.8091E-01 0.7105E-13 0.8303E-12 156 0.3121E-01 0.1701E+00 0.5329E-13 0.4261E-12 157 0.3677E-01 0.3338E+00 0.3908E-13 0.4371E-12 158 0.9001E-02 0.5184E+00 0.2132E-12 0.3828E-12 159 0.3002E-01 0.5701E+00 0.6395E-13 0.3282E-12 160 0.3675E-01 0.4354E+00 0.2132E-13 0.1158E-11 161 0.2227E-01 0.2498E+00 0.2842E-13 0.5956E-12 162 0.9949E-02 0.1283E+00 0.4974E-13 0.5981E-12 163 0.3897E-02 0.7166E-01 0.1208E-12 0.5530E-12 164 0.1454E-02 0.4905E-01 0.4263E-13 0.8810E-12 165 0.5597E-03 0.4073E-01 0.1421E-13 0.8945E-12 166 0.2982E-03 0.3807E-01 0.1492E-12 0.6086E-12 167 0.3820E-03 0.3798E-01 0.9237E-13 0.6890E-12 168 0.9075E-03 0.4025E-01 0.7816E-13 0.3704E-12 169 0.2464E-02 0.4738E-01 0.1634E-12 0.4309E-12 170 0.6611E-02 0.6741E-01 0.7105E-13 0.1230E-11 171 0.1609E-01 0.1214E+00 0.1279E-12 0.2273E-12 172 0.2981E-01 0.2521E+00 0.5684E-13 0.7447E-12 173 0.2776E-01 0.4897E+00 0.4263E-13 0.4689E-12 174 0.7046E-02 0.7083E+00 0.5684E-13 0.7719E-12 175 0.3247E-01 0.6655E+00 0.2061E-12 0.7958E-12 176 0.2531E-01 0.4195E+00 0.5684E-13 0.1022E-11 177 0.1188E-01 0.2157E+00 0.2132E-13 0.3256E-12 178 0.4638E-02 0.1171E+00 0.2132E-13 0.3885E-12 179 0.2015E-02 0.7984E-01 0.0000E+00 0.3083E-13 180 0.1840E-02 0.6913E-01 0.5684E-13 0.5371E-12 181 0.3991E-02 0.7242E-01 0.4974E-13 0.6645E-12 182 0.1083E-01 0.9360E-01 0.7816E-13 0.3862E-12 183 0.2730E-01 0.1567E+00 0.4263E-13 0.7030E-12 184 0.5081E-01 0.3130E+00 0.1350E-12 0.4958E-12 185 0.4351E-01 0.5846E+00 0.1421E-12 0.8485E-12 186 0.1788E-01 0.7999E+00 0.4974E-13 0.5652E-12 187 0.5489E-01 0.7283E+00 0.8527E-13 0.3110E-12 188 0.3864E-01 0.4557E+00 0.1421E-12 0.5499E-12 189 0.1672E-01 0.2383E+00 0.1776E-12 0.9651E-12 190 0.6135E-02 0.1384E+00 0.2487E-12 0.4908E-12 191 0.2707E-02 0.1032E+00 0.4974E-13 0.9653E-12 192 0.3013E-02 0.9501E-01 0.1918E-12 0.5958E-12 193 0.7541E-02 0.1027E+00 0.1066E-12 0.5105E-12 194 0.2152E-01 0.1363E+00 0.3126E-12 0.7703E-12 195 0.5320E-01 0.2342E+00 0.1279E-12 0.7750E-12 196 0.8524E-01 0.4549E+00 0.8527E-13 0.3955E-12 197 0.4490E-01 0.7390E+00 0.2842E-13 0.6822E-13 198 0.5394E-01 0.8598E+00 0.7816E-13 0.7666E-12 199 0.8354E-01 0.7332E+00 0.2061E-12 0.5872E-12 200 0.4805E-01 0.4503E+00 0.1918E-12 0.5678E-12 201 0.1839E-01 0.2442E+00 0.1492E-12 0.9563E-12 202 0.6130E-02 0.1588E+00 0.1563E-12 0.2113E-12 203 0.2372E-02 0.1360E+00 0.2345E-12 0.7090E-12 204 0.2268E-02 0.1483E+00 0.3340E-12 0.4044E-12 205 0.5201E-02 0.2137E+00 0.6395E-13 0.7784E-12 206 0.1094E-01 0.4104E+00 0.3126E-12 0.8320E-12 207 0.9846E-02 0.8274E+00 0.2345E-12 0.4857E-12 208 0.5015E-02 0.1181E+01 0.2842E-12 0.5258E-12 209 0.1102E-01 0.9513E+00 0.2345E-12 0.1281E-11 210 0.6134E-02 0.5084E+00 0.2984E-12 0.7441E-12 211 0.2250E-02 0.2691E+00 0.3695E-12 0.3748E-12 212 0.8099E-03 0.1869E+00 0.2061E-12 0.1082E-11 213 0.6085E-03 0.1701E+00 0.1208E-12 0.7227E-12 214 0.1394E-02 0.1929E+00 0.2274E-12 0.2810E-12 215 0.3885E-02 0.2903E+00 0.1208E-12 0.3475E-12 216 0.7220E-02 0.5769E+00 0.2984E-12 0.4280E-12 217 0.3307E-02 0.1110E+01 0.1350E-12 0.3660E-12 218 0.5844E-02 0.1348E+01 0.3908E-12 0.7906E-12 219 0.5947E-02 0.9046E+00 0.2487E-12 0.3586E-12 220 0.2514E-02 0.4578E+00 0.3908E-12 0.7632E-12 221 0.7378E-03 0.2705E+00 0.2984E-12 0.7965E-12 222 0.3022E-04 0.2188E+00 0.4121E-12 0.2042E-12 223 0.5840E-03 0.2280E+00 0.2700E-12 0.6315E-12 224 0.1855E-02 0.3129E+00 0.3624E-12 0.8861E-12 225 0.3507E-02 0.5927E+00 0.3766E-12 0.6564E-12 226 0.1192E-02 0.1192E+01 0.4690E-12 0.8594E-12 227 0.4029E-02 0.1569E+01 0.4974E-12 0.7391E-12 228 0.3561E-02 0.1096E+01 0.3766E-12 0.6239E-12 229 0.1237E-02 0.5527E+00 0.2771E-12 0.8032E-12 230 0.1935E-04 0.3271E+00 0.1421E-12 0.4455E-12 231 0.1147E-02 0.2686E+00 0.4192E-12 0.5677E-12 232 0.4409E-02 0.2851E+00 0.3055E-12 0.1042E-11 233 0.1365E-01 0.4058E+00 0.3482E-12 0.4133E-12 234 0.2440E-01 0.8007E+00 0.2842E-12 0.9940E-12 235 0.2853E-02 0.1549E+01 0.4476E-12 0.2452E-12 236 0.2853E-01 0.1769E+01 0.3411E-12 0.4799E-12 237 0.2408E-01 0.1092E+01 0.3553E-12 0.3675E-12 238 0.2475E-01 0.5960E+00 0.5826E-12 0.1035E-11 239 0.6361E-01 0.5533E+00 0.4761E-12 0.1309E-11 240 0.1242E+00 0.9878E+00 0.4334E-12 0.8877E-12 241 0.3238E-01 0.1802E+01 0.3979E-12 0.5955E-12 242 0.1267E+00 0.2069E+01 0.4334E-12 0.7587E-12 243 0.9275E-01 0.1400E+01 0.3695E-12 0.8340E-14 244 0.3086E-01 0.6869E+00 0.4121E-12 0.6241E-12 245 0.1796E-01 0.4733E+00 0.4832E-12 0.7508E-12 246 0.3819E-01 0.5741E+00 0.4192E-12 0.1044E-11 247 0.6439E-01 0.1078E+01 0.3482E-12 0.6114E-12 248 0.3395E-02 0.1958E+01 0.5684E-12 0.6276E-12 249 0.6599E-01 0.2081E+01 0.4334E-12 0.9486E-12 250 0.4054E-01 0.1243E+01 0.5613E-12 0.4983E-12 251 0.1248E-01 0.6632E+00 0.5116E-12 0.1028E-11 252 0.3649E-02 0.5000E+00 0.3126E-12 0.5670E-12 253 0.2900E-02 0.5553E+00 0.5329E-12 0.1187E-11 254 0.5381E-02 0.9294E+00 0.4761E-12 0.5535E-12 255 0.2906E-02 0.1926E+01 0.6253E-12 0.7642E-12 256 0.5250E-02 0.2626E+01 0.3553E-12 0.7453E-12 257 0.4021E-02 0.1742E+01 0.4974E-12 0.7757E-12 258 0.9100E-03 0.8946E+00 0.5684E-12 0.5145E-12 259 0.1127E-01 0.6687E+00 0.3624E-12 0.3787E-12 260 0.4624E-01 0.9036E+00 0.5471E-12 0.8726E-12 261 0.7361E-01 0.1992E+01 0.5187E-12 0.1097E-11 262 0.2290E-01 0.3443E+01 0.5898E-12 0.5676E-12 263 0.6113E-01 0.2684E+01 0.4192E-12 0.6636E-12 264 0.2846E-01 0.1338E+01 0.5755E-12 0.3427E-12 265 0.2576E-01 0.1080E+01 0.4974E-12 0.6068E-12 266 0.3964E-01 0.1867E+01 0.6537E-12 0.5827E-12 267 0.3477E-02 0.3320E+01 0.6537E-12 0.9645E-12 268 0.2658E-01 0.2929E+01 0.6040E-12 0.2010E-12 269 0.1304E-01 0.1498E+01 0.5045E-12 0.6980E-12 270 0.3460E-02 0.9123E+00 0.6111E-12 0.1189E-11 271 0.7469E-03 0.8741E+00 0.5826E-12 0.3246E-12 272 0.7193E-03 0.1313E+01 0.5400E-12 0.5344E-12 273 0.2461E-02 0.2748E+01 0.5187E-12 0.1064E-11 274 0.1796E-02 0.3991E+01 0.5755E-12 0.1469E-11 275 0.1011E-03 0.2641E+01 0.7105E-12 0.4321E-12 276 0.5192E-03 0.1355E+01 0.6679E-12 0.5377E-12 277 0.1530E-02 0.1016E+01 0.6395E-12 0.1056E-11 278 0.6520E-02 0.1161E+01 0.7176E-12 0.5686E-12 279 0.1614E-01 0.2077E+01 0.6040E-12 0.5005E-12 280 0.4135E-02 0.4157E+01 0.6253E-12 0.7607E-12 281 0.1349E-01 0.4308E+01 0.7745E-12 0.9871E-12 282 0.8222E-02 0.2307E+01 0.6892E-12 0.2371E-12 283 0.8288E-02 0.1411E+01 0.7105E-12 0.3079E-12 284 0.3432E-01 0.1492E+01 0.6892E-12 0.7648E-12 285 0.8979E-01 0.2846E+01 0.5684E-12 0.6061E-12 286 0.1767E-01 0.5781E+01 0.7532E-12 0.5001E-12 287 0.5980E-01 0.5408E+01 0.6537E-12 0.8122E-12 288 0.1216E-01 0.2895E+01 0.6608E-12 0.1858E-12 289 0.4396E-01 0.2576E+01 0.6466E-12 0.4213E-12 290 0.2129E-01 0.5020E+01 0.6608E-12 0.1106E-11 291 0.8163E-01 0.7530E+01 0.5400E-12 0.4591E-12 292 0.4515E-01 0.4709E+01 0.5969E-12 0.7279E-12 293 0.6590E-02 0.2374E+01 0.6395E-12 0.2184E-13 294 0.8973E-02 0.2099E+01 0.6111E-12 0.1268E-11 295 0.2476E-01 0.3350E+01 0.6040E-12 0.4703E-13 296 0.2018E-02 0.7083E+01 0.7319E-12 0.3424E-12 297 0.3002E-01 0.8058E+01 0.6395E-12 0.9808E-12 298 0.1022E-01 0.4371E+01 0.7461E-12 0.1330E-13 299 0.8597E-02 0.2746E+01 0.7105E-12 0.8622E-12 300 0.6291E-01 0.3039E+01 0.5898E-12 0.1020E-11 301 0.1544E+00 0.6110E+01 0.5969E-12 0.3370E-12 302 0.2391E-02 0.1148E+02 0.8740E-12 0.9687E-12 303 0.8535E-01 0.9684E+01 0.6892E-12 0.2304E-12 304 0.2612E-01 0.5531E+01 0.7319E-12 0.1014E-11 305 0.2001E+00 0.5674E+01 0.7461E-12 0.4820E-13 306 0.2008E+00 0.9179E+01 0.8598E-12 0.4641E-12 307 0.1261E+00 0.9721E+01 0.7319E-12 0.4214E-12 308 0.2816E+00 0.1227E+02 0.8598E-12 0.3838E-12 309 0.8353E-01 0.9818E+01 0.6466E-12 0.1411E-11 310 0.5781E-01 0.8673E+01 0.7390E-12 0.5093E-12 311 0.4699E-01 0.1699E+02 0.8029E-12 0.9629E-12 312 0.1092E+00 0.2632E+02 0.8029E-12 0.6435E-12 313 0.6179E-01 0.1828E+02 0.7390E-12 0.1836E-12 314 0.7187E-02 0.1154E+02 0.7958E-12 0.8316E-12 315 0.2121E-01 0.1398E+02 0.7674E-12 0.1651E-11 316 0.3125E-01 0.3289E+02 0.8455E-12 0.1537E-11 317 0.2800E-01 0.7230E+02 0.7034E-12 0.1714E-11 318 0.2332E-01 0.6998E+02 0.6963E-12 0.3081E-11 319 0.3762E-02 0.7250E+02 0.6821E-12 0.5755E-11 0.8740E-12 0.5755E-11 C-END-OF-FILE cat < test4.f c c program test4 c c external qchle dimension a(81),b(81),e(81),xp(1),yp(1),endl(1),endr(1), *xfer(1),wfer(1),alpha(80),beta(80),be(80),x(81),w(81), *xm(162),wm(162),p0(162),p1(162),p2(162),betap(80,3) logical finl,finr common/s/c,a,b,e,epsma c c This is a test of the routine mcdis, which is applied to generate c the first 80 recurrence coefficients for the orthogonal polynomials c belonging to the weight function c c (1-x**2)**(-1/2) + c on (-1,1), c = 1, 10, 100. c c The corresponding inner product is discretized by applying the c Gauss-Chebyshev quadrature rule to the first term of the weight c function, and the Gauss-Legendre rule to the second term. In c addition to the beta-coefficients (all alpha's are zero), the c routine prints the variables ncap and kount to confirm c convergence after one iteration. c write(*,1) 1 format(/) c c epsma is the machine single precision. c epsma=r1mach(3) iq=1 idelta=2 irout=1 n=80 mc=2 mp=0 ncapm=81 eps=5000.*epsma iem=0 c=.1 do 20 ic=1,3 c=10.*c c c Compute the desired recursion coefficients. On machines with limited c exponent range, harmless underflow may occur in the routine gauss c used in qchle to generate the Gauss-Legendre quadrature rule. c call mcdis(n,ncapm,mc,mp,xp,yp,qchle,eps,iq,idelta,irout,finl, * finr,endl,endr,xfer,wfer,alpha,beta,ncap,kount,ierr,ie,be, * x,w,xm,wm,p0,p1,p2) write(*,2) ncap,kount,ierr,ie,c 2 format(3x,'ncap = ',i3,' kount = ',i2,' ierr = ',i3, * ' ie = ',i3,' for c = ',f5.1) if(abs(ie).gt.iem) iem=abs(ie) if(ie.ne.0 .and. abs(ie).le.n) then call mcdis(abs(ie)-1,ncapm,mc,mp,xp,yp,qchle,eps,iq,idelta, * irout,finl,finr,endl,endr,xfer,wfer,alpha,beta,ncap,kount, * ierr,ie,be,x,w,xm,wm,p0,p1,p2) write(*,2) ncap,kount,ierr,ie,c write(*,1) end if c c Assemble the results in an array. c do 10 k=1,n if(ie.eq.0 .or. k-1.lt.abs(ie)) then betap(k,ic)=beta(k) else betap(k,ic)=0. end if 10 continue 20 continue c c Print the results. c write(*,3) 3 format(//3x,'k',4x,'beta(k), c=1',6x,'beta(k), c=10',4x, * 'beta(k), c=100'/) do 30 k=1,n km1=k-1 if(iem.eq.0 .or. km1.lt.iem) write(*,4) km1,betap(k,1), * betap(k,2),betap(k,3) 4 format(1x,i3,3e18.10) 30 continue stop end subroutine qchle(n,x,w,i,ierr) dimension x(n),w(n),a(81),b(81),e(81) common/s/c,a,b,e,epsma fn=real(n) pi=4.*atan(1.) if(i.eq.1) then do 10 k=1,n fk=real(k) x(k)=cos((2.*fk-1.)*pi/(2.*fn)) w(k)=pi/fn 10 continue else call recur(n,1,0.,0.,a,b,ierr) call gauss(n,a,b,epsma,x,w,ierr,e) do 20 k=1,n w(k)=c*w(k) 20 continue end if return end function wf(x,i) c c This is a dummy function. It is never called, since the routine c qgp in mcdis which requires wf is not activated in this test. c wf=0. return end C-END-OF-FILE cat < test4.out output of test4: NCAP = 81 KOUNT = 1 IERR = 0 IE = 0 FOR C = 1.0 NCAP = 81 KOUNT = 1 IERR = 0 IE = 0 FOR C = 10.0 NCAP = 81 KOUNT = 1 IERR = 0 IE = 0 FOR C = 100.0 K BETA(K), C=1 BETA(K), C=10 BETA(K), C=100 0 0.5141592654E+01 0.2314159265E+02 0.2031415927E+03 1 0.4351692451E+00 0.3559592080E+00 0.3359108398E+00 2 0.2701372783E+00 0.2726441920E+00 0.2675420941E+00 3 0.2554832000E+00 0.2599946359E+00 0.2576704220E+00 4 0.2521529485E+00 0.2555837503E+00 0.2543427437E+00 5 0.2510395775E+00 0.2535184776E+00 0.2528129500E+00 6 0.2505736300E+00 0.2523874615E+00 0.2519798999E+00 7 0.2503473909E+00 0.2517042416E+00 0.2514744940E+00 8 0.2502252811E+00 0.2512626755E+00 0.2511438832E+00 9 0.2501539444E+00 0.2509627742E+00 0.2509152482E+00 10 0.2501096295E+00 0.2507511668E+00 0.2507502245E+00 11 0.2500807183E+00 0.2505972527E+00 0.2506270022E+00 12 0.2500610870E+00 0.2504824840E+00 0.2505324193E+00 13 0.2500473066E+00 0.2503951069E+00 0.2504581409E+00 14 0.2500373582E+00 0.2503273961E+00 0.2503986746E+00 15 0.2500300021E+00 0.2502741170E+00 0.2503502784E+00 16 0.2500244489E+00 0.2502316296E+00 0.2503103292E+00 17 0.2500201801E+00 0.2501973453E+00 0.2502769428E+00 18 0.2500168461E+00 0.2501693876E+00 0.2502487366E+00 19 0.2500142052E+00 0.2501463723E+00 0.2502246765E+00 20 0.2500120866E+00 0.2501272629E+00 0.2502039763E+00 21 0.2500103678E+00 0.2501112724E+00 0.2501860296E+00 22 0.2500089590E+00 0.2500977963E+00 0.2501703617E+00 23 0.2500077935E+00 0.2500863647E+00 0.2501565972E+00 24 0.2500068210E+00 0.2500766085E+00 0.2501444355E+00 25 0.2500060034E+00 0.2500682357E+00 0.2501336338E+00 26 0.2500053110E+00 0.2500610125E+00 0.2501239939E+00 27 0.2500047209E+00 0.2500547510E+00 0.2501153529E+00 28 0.2500042148E+00 0.2500492984E+00 0.2501075758E+00 29 0.2500037783E+00 0.2500445301E+00 0.2501005498E+00 30 0.2500034000E+00 0.2500403435E+00 0.2500941802E+00 31 0.2500030704E+00 0.2500366538E+00 0.2500883868E+00 32 0.2500027819E+00 0.2500333906E+00 0.2500831015E+00 33 0.2500025284E+00 0.2500304948E+00 0.2500782661E+00 34 0.2500023048E+00 0.2500279170E+00 0.2500738306E+00 35 0.2500021067E+00 0.2500256152E+00 0.2500697517E+00 36 0.2500019306E+00 0.2500235542E+00 0.2500659919E+00 37 0.2500017735E+00 0.2500217037E+00 0.2500625187E+00 38 0.2500016330E+00 0.2500200378E+00 0.2500593035E+00 39 0.2500015070E+00 0.2500185345E+00 0.2500563213E+00 40 0.2500013935E+00 0.2500171748E+00 0.2500535501E+00 41 0.2500012912E+00 0.2500159420E+00 0.2500509703E+00 42 0.2500011986E+00 0.2500148221E+00 0.2500485648E+00 43 0.2500011146E+00 0.2500138024E+00 0.2500463182E+00 44 0.2500010383E+00 0.2500128723E+00 0.2500442168E+00 45 0.2500009688E+00 0.2500120223E+00 0.2500422484E+00 46 0.2500009053E+00 0.2500112440E+00 0.2500404021E+00 47 0.2500008473E+00 0.2500105301E+00 0.2500386680E+00 48 0.2500007941E+00 0.2500098743E+00 0.2500370372E+00 49 0.2500007453E+00 0.2500092708E+00 0.2500355018E+00 50 0.2500007004E+00 0.2500087145E+00 0.2500340545E+00 51 0.2500006590E+00 0.2500082010E+00 0.2500326887E+00 52 0.2500006208E+00 0.2500077264E+00 0.2500313986E+00 53 0.2500005855E+00 0.2500072870E+00 0.2500301786E+00 54 0.2500005528E+00 0.2500068798E+00 0.2500290239E+00 55 0.2500005225E+00 0.2500065017E+00 0.2500279299E+00 56 0.2500004944E+00 0.2500061504E+00 0.2500268925E+00 57 0.2500004682E+00 0.2500058236E+00 0.2500259079E+00 58 0.2500004439E+00 0.2500055191E+00 0.2500249727E+00 59 0.2500004212E+00 0.2500052351E+00 0.2500240836E+00 60 0.2500004001E+00 0.2500049699E+00 0.2500232377E+00 61 0.2500003803E+00 0.2500047220E+00 0.2500224324E+00 62 0.2500003618E+00 0.2500044901E+00 0.2500216651E+00 63 0.2500003445E+00 0.2500042729E+00 0.2500209335E+00 64 0.2500003283E+00 0.2500040693E+00 0.2500202354E+00 65 0.2500003130E+00 0.2500038782E+00 0.2500195690E+00 66 0.2500002987E+00 0.2500036987E+00 0.2500189323E+00 67 0.2500002853E+00 0.2500035299E+00 0.2500183237E+00 68 0.2500002726E+00 0.2500033711E+00 0.2500177416E+00 69 0.2500002607E+00 0.2500032216E+00 0.2500171845E+00 70 0.2500002495E+00 0.2500030806E+00 0.2500166509E+00 71 0.2500002389E+00 0.2500029476E+00 0.2500161398E+00 72 0.2500002289E+00 0.2500028221E+00 0.2500156498E+00 73 0.2500002194E+00 0.2500027035E+00 0.2500151798E+00 74 0.2500002105E+00 0.2500025913E+00 0.2500147288E+00 75 0.2500002020E+00 0.2500024852E+00 0.2500142958E+00 76 0.2500001940E+00 0.2500023848E+00 0.2500138799E+00 77 0.2500001864E+00 0.2500022895E+00 0.2500134802E+00 78 0.2500001792E+00 0.2500021993E+00 0.2500130960E+00 79 0.2500001724E+00 0.2500021136E+00 0.2500127264E+00 C-END-OF-FILE cat < test5.f c c program test5 c c external qjac dimension a(41),b(41),e(41),xp(1),yp(1),endl(1),endr(1),xfer(1), *wfer(1),alpha(40), beta(40),be(40),x(41),w(41),xm(42),wm(42), *p0(42),p1(42),p2(42) double precision dy,dalj,dbej,dalpbe,da(41),db(41),daex(40), *dbex(40),dnum,dd,dkm1,dden logical finl,finr common/s/a,b,e,epsma c c This test generates the first 40 recursion coefficients for c polynomials orthogonal with respect to the Jacobi weight function c with parameters alj = -.8(.2)1., bej = -.8(.2)1. and an added mass c point of strength y = .5, 1, 2, 4, 8 at the left end point. It c also computes the maximum relative errors (absolute errors for alpha- c coefficients near zero) of the computed coefficients by comparing c them against the exact coefficients known analytically. c write(*,1) 1 format(/) c c epsma is the machine single precision c epsma=r1mach(3) iq=1 idelta=2 irout=1 n=40 mc=1 mp=1 xp(1)=-1. ncapm=41 eps=5000.*epsma y=.25 do 40 iy=1,5 y=2.*y dy=dble(y) yp(1)=y write(*,2) y 2 format(/1x,'y = ',f6.2/) write(*,3) 3 format(2x,'alj',2x,'bej',5x,'erra',7x,'errb',6x,'alpha', * 4x,'beta',4x,'ka',2x,'kb',1x,'ierr',1x,'ie',1x,'it'/) do 30 ia=1,10 alj=-1.+.2*real(ia) dalj=dble(alj) do 20 ib=1,10 bej=-1.+.2*real(ib) alpbe=alj+bej dbej=dble(bej) dalpbe=dalj+dbej c c Generate the Jacobi recurrence coefficients. c call recur(ncapm,6,alj,bej,a,b,ierr) call drecur(ncapm,6,dalj,dbej,da,db,iderr) c c Compute the desired recursion coefficients. c call mcdis(n,ncapm,mc,mp,xp,yp,qjac,eps,iq,idelta,irout, * finl,finr,endl,endr,xfer,wfer,alpha,beta,ncap,kount, * ierr,ie,be,x,w,xm,wm,p0,p1,p2) c c Compute the exact coefficients by Eqs. (4.19)-(4.21) of the companion c paper along with the relative errors (absolute errors for alpha- c coefficients close to zero). c daex(1)=(da(1)-dy)/(1.d0+dy) dbex(1)=1.d0+dy erra=abs(sngl(dble(alpha(1))-daex(1))) if(abs(sngl(daex(1))).gt.eps) erra=erra/abs(sngl(daex(1))) errb=abs(sngl((dble(beta(1))-dbex(1))/dbex(1))) erram=erra alpham=alpha(1) errbm=errb betam=beta(1) kam=0 kbm=0 dnum=1.d0+dy dd=1.d0 do 10 k=2,n km1=k-1 dkm1=dble(km1) dden=dnum if(k.gt.2) dd=(dbej+dkm1)*(dalpbe+dkm1)*dd/((dalj+dkm1 * -1.d0)*(dkm1-1.d0)) dnum=(1.d0+(dbej+dkm1+1.d0)*(dalpbe+dkm1+1.d0)*dy*dd/ * (dkm1*(dalj+dkm1)))/(1.d0+dy*dd) daex(k)=da(k)+2.d0*dkm1*(dkm1+dalj)*(dnum-1.d0)/ * ((dalpbe+2.d0*dkm1)*(dalpbe+2.d0*dkm1+1.d0)) * +2.d0*(dbej+dkm1+1.d0)*(dalpbe+dkm1+1.d0)*((1.d0/dnum) * -1.d0)/((dalpbe+2.d0*dkm1+1.d0)*(dalpbe+2.d0*dkm1+2.d0)) dbex(k)=dnum*db(k)/dden erra=abs(sngl(dble(alpha(k))-daex(k))) if(abs(sngl(daex(k))).gt.eps) erra=erra/abs(sngl(daex(k))) errb=abs(sngl((dble(beta(k))-dbex(k))/dbex(k))) if(erra.gt.erram) then erram=erra alpham=alpha(k) kam=km1 end if if(errb.gt.errbm) then errbm=errb betam=beta(k) kbm=km1 end if 10 continue c c Print the results. c write(*,4) alj,bej,erram,errbm,alpham,betam,kam,kbm,ierr, * ie,kount 4 format(1x,2f5.2,2e11.4,2f9.6,4i4,i2) 20 continue write(*,1) 30 continue 40 continue stop end subroutine qjac(n,x,w,i,ierr) dimension x(n),w(n),a(41),b(41),e(41) common/s/a,b,e,epsma call gauss(n,a,b,epsma,x,w,ierr,e) do 10 k=1,n w(k)=w(k)/b(1) 10 continue return end function wf(x,i) c c This is a dummy function. It is never called, since the routine c qgp in mcdis which requires wf is not activated in this test. c wf=0. return end C-END-OF-FILE cat < test5.out output of test5: Y = 0.50 ALJ BEJ ERRA ERRB ALPHA BETA KA KB IERR IE IT -0.80-0.80 0.2008E-07 0.2797E-11 0.000103 0.249880 39 39 0 0 1 -0.80-0.60 0.1522E-07 0.4399E-11 0.000205 0.249819 39 38 0 0 1 -0.80-0.40 0.6907E-08 0.4433E-11 0.000329 0.249761 38 38 0 0 1 -0.80-0.20 0.5293E-08 0.4341E-11 0.000448 0.249700 38 38 0 0 1 -0.80 0.00 0.3659E-08 0.4479E-11 0.000578 0.249634 38 38 0 0 1 -0.80 0.20 0.3692E-08 0.5209E-11 0.000719 0.249562 38 38 0 0 1 -0.80 0.40 0.3137E-08 0.4965E-11 0.000829 0.249484 39 38 0 0 1 -0.80 0.60 0.2520E-08 0.5103E-11 0.000986 0.249400 39 38 0 0 1 -0.80 0.80 0.1930E-08 0.4132E-11 0.001154 0.249272 39 37 0 0 1 -0.80 1.00 0.2083E-08 0.5403E-11 0.001333 0.249170 39 37 0 0 1 -0.60-0.80 0.5881E-08 0.2216E-11 0.000141 0.249909 39 39 0 0 1 -0.60-0.60 0.1029E-07 0.2779E-11 0.000242 0.249842 39 37 0 0 1 -0.60-0.40 0.9147E-08 0.5351E-11 0.000353 0.249800 39 39 0 0 1 -0.60-0.20 0.5280E-08 0.5679E-11 0.000493 0.249741 38 39 0 0 1 -0.60 0.00 0.5118E-08 0.3682E-11 0.000623 0.249661 38 38 0 0 1 -0.60 0.20 0.3336E-08 0.5014E-11 0.000763 0.249610 38 39 0 0 1 -0.60 0.40 0.2611E-08 0.5225E-11 0.000916 0.249536 38 39 0 0 1 -0.60 0.60 0.1796E-08 0.4305E-11 0.001080 0.249456 38 39 0 0 1 -0.60 0.80 0.2384E-08 0.4550E-11 0.001255 0.249337 38 38 0 0 1 -0.60 1.00 0.1790E-08 0.4729E-11 0.001442 0.249280 38 39 0 0 1 -0.40-0.80 0.3390E-08 0.2863E-11 0.000197 0.249925 36 38 0 0 1 -0.40-0.60 0.4043E-08 0.3173E-11 0.000268 0.249871 39 38 0 0 1 -0.40-0.40 0.2162E-08 0.1675E-11 0.000446 0.249820 36 39 0 0 1 -0.40-0.20 0.5395E-08 0.4201E-11 0.000551 0.249760 37 39 0 0 1 -0.40 0.00 0.3460E-08 0.4283E-11 0.000653 0.249697 38 39 0 0 1 -0.40 0.20 0.3351E-08 0.5721E-11 0.000793 0.249629 38 39 0 0 1 -0.40 0.40 0.3893E-08 0.7894E-11 0.000897 0.249555 39 39 0 0 1 -0.40 0.60 0.2175E-08 0.4622E-11 0.001052 0.249475 39 39 0 0 1 -0.40 0.80 0.2550E-08 0.6324E-11 0.001282 0.249390 38 39 0 0 1 -0.40 1.00 0.1455E-08 0.3850E-11 0.001468 0.249300 38 39 0 0 1 -0.20-0.80 0.9849E-08 0.3911E-11 0.000185 0.249938 39 38 0 0 1 -0.20-0.60 0.4123E-08 0.1709E-11 0.000282 0.249891 39 39 0 0 1 -0.20-0.40 0.1994E-08 0.1540E-11 0.000463 0.249792 36 35 0 0 1 -0.20-0.20 0.1890E-08 0.1247E-11 0.000569 0.249616 37 30 0 0 1 -0.20 0.00 0.3060E-08 0.3705E-11 0.000705 0.249693 37 38 0 0 1 -0.20 0.20 0.6033E-08 0.2909E-11 0.000769 0.249641 39 39 0 0 1 -0.20 0.40 0.3270E-08 0.4586E-11 0.000912 0.249567 39 39 0 0 1 -0.20 0.60 0.2204E-08 0.7549E-11 0.001182 0.249488 37 39 0 0 1 -0.20 0.80 0.1774E-08 0.4688E-11 0.001365 0.249403 37 39 0 0 1 -0.20 1.00 0.1692E-08 0.6945E-11 0.001481 0.249313 38 39 0 0 1 0.00-0.80 0.9110E-08 0.2753E-11 0.000188 0.249945 39 39 0 0 1 0.00-0.60 0.6130E-08 0.2144E-11 0.000284 0.249879 39 36 0 0 1 0.00-0.40 0.2893E-08 0.2387E-11 0.000465 0.249837 36 39 0 0 1 0.00-0.20 0.1222E-08 0.1433E-11 0.000674 0.249739 34 36 0 0 1 0.00 0.00 0.2315E-08 0.1714E-11 0.000672 0.249664 38 36 0 0 1 0.00 0.20 0.2983E-08 0.3926E-11 0.000771 0.249646 39 39 0 0 1 0.00 0.40 0.2958E-08 0.3865E-11 0.000913 0.249572 39 39 0 0 1 0.00 0.60 0.2448E-08 0.4778E-11 0.001067 0.249467 39 38 0 0 1 0.00 0.80 0.2631E-08 0.3528E-11 0.001231 0.249378 39 38 0 0 1 0.00 1.00 0.1637E-08 0.7271E-11 0.001406 0.249319 39 39 0 0 1 0.20-0.80 0.1255E-07 0.1808E-11 0.000179 0.249602 39 14 0 0 1 0.20-0.60 0.3108E-08 0.3941E-11 0.000318 0.249895 36 39 0 0 1 0.20-0.40 0.1934E-08 0.4024E-11 0.000505 0.249836 34 39 0 0 1 0.20-0.20 0.1797E-08 0.2302E-11 0.000591 0.249775 36 39 0 0 1 0.20 0.00 0.1280E-08 0.1609E-11 0.000735 0.249663 36 36 0 0 1 0.20 0.20 0.1732E-08 0.1513E-11 0.000760 0.249583 39 36 0 0 1 0.20 0.40 0.2263E-08 0.4491E-11 0.000902 0.249549 39 38 0 0 1 0.20 0.60 0.1760E-08 0.3972E-11 0.001055 0.249466 39 38 0 0 1 0.20 0.80 0.1583E-08 0.4957E-11 0.001219 0.249378 39 38 0 0 1 0.20 1.00 0.2301E-08 0.3285E-11 0.001393 0.249284 39 38 0 0 1 0.40-0.80 0.8743E-08 0.2168E-11 0.000166 0.249927 38 37 0 0 1 0.40-0.60 0.6626E-08 0.2199E-11 0.000250 0.249869 39 36 0 0 1 0.40-0.40 0.1814E-08 0.2020E-11 0.000448 0.249819 35 38 0 0 1 0.40-0.20 0.1647E-08 0.1876E-11 0.000564 0.249712 36 35 0 0 1 0.40 0.00 0.1264E-08 0.1245E-11 0.000792 0.249588 34 33 0 0 1 0.40 0.20 0.1143E-08 0.1572E-11 0.000737 0.249574 39 36 0 0 1 0.40 0.40 0.2111E-08 0.1983E-11 0.000879 0.249516 39 37 0 0 1 0.40 0.60 0.2242E-08 0.2149E-11 0.001085 0.249364 38 35 0 0 1 0.40 0.80 0.1899E-08 0.3892E-11 0.001194 0.249371 39 38 0 0 1 0.40 1.00 0.2156E-08 0.3159E-11 0.001368 0.249278 39 38 0 0 1 0.60-0.80 0.2634E-07 0.1891E-11 0.000124 0.249914 39 38 0 0 1 0.60-0.60 0.8201E-08 0.2500E-11 0.000214 0.249872 39 39 0 0 1 0.60-0.40 0.5458E-08 0.1605E-11 0.000329 0.249804 39 38 0 0 1 0.60-0.20 0.1756E-08 0.1919E-11 0.000522 0.249753 36 39 0 0 1 0.60 0.00 0.4830E-08 0.1847E-11 0.000571 0.249616 39 35 0 0 1 0.60 0.20 0.1638E-08 0.1499E-11 0.000739 0.249558 38 36 0 0 1 0.60 0.40 0.1645E-08 0.1367E-11 0.000843 0.249473 39 36 0 0 1 0.60 0.60 0.1613E-08 0.1680E-11 0.001102 0.249473 37 39 0 0 1 0.60 0.80 0.1132E-08 0.3560E-11 0.001217 0.249323 38 37 0 0 1 0.60 1.00 0.2198E-08 0.5000E-11 0.001399 0.249265 38 38 0 0 1 0.80-0.80 0.1412E-07 0.2106E-11 0.000085 0.249816 37 29 0 0 1 0.80-0.60 0.4115E-08 0.1778E-11 0.000167 0.249843 39 38 0 0 1 0.80-0.40 0.3767E-08 0.1749E-11 0.000282 0.249792 39 39 0 0 1 0.80-0.20 0.4240E-08 0.1453E-11 0.000400 0.249732 39 39 0 0 1 0.80 0.00 0.1706E-08 0.1866E-11 0.000611 0.249669 36 39 0 0 1 0.80 0.20 0.1933E-08 0.1300E-11 0.000725 0.249334 37 30 0 0 1 0.80 0.40 0.8649E-09 0.1295E-11 0.000881 0.248681 37 23 0 0 1 0.80 0.60 0.1259E-08 0.1371E-11 0.000947 0.249424 39 38 0 0 1 0.80 0.80 0.1872E-08 0.2023E-11 0.001108 0.249302 39 37 0 0 1 0.80 1.00 0.9238E-09 0.1853E-11 0.001347 0.249283 38 39 0 0 1 1.00-0.80 0.3532E-06 0.2544E-11 0.000001 0.249827 9 34 0 0 1 1.00-0.60 0.2046E-07 0.2751E-11 0.000107 0.249823 39 39 0 0 1 1.00-0.40 0.1377E-07 0.3013E-11 0.000222 0.249765 39 39 0 0 1 1.00-0.20 0.9010E-08 0.2773E-11 0.000341 0.249689 39 38 0 0 1 1.00 0.00 0.1705E-08 0.1244E-11 0.000514 0.249603 37 37 0 0 1 1.00 0.20 0.1431E-08 0.1227E-11 0.000776 0.249575 34 39 0 0 1 1.00 0.40 0.1918E-08 0.1777E-11 0.000815 0.249351 37 34 0 0 1 1.00 0.60 0.8273E-09 0.1250E-11 0.000886 0.249103 39 31 0 0 1 1.00 0.80 0.9986E-09 0.1395E-11 0.001160 0.249311 37 38 0 0 1 1.00 1.00 0.1307E-08 0.1639E-11 0.001282 0.248973 38 33 0 0 1 Y = 1.00 ALJ BEJ ERRA ERRB ALPHA BETA KA KB IERR IE IT -0.80-0.80 0.1909E-07 0.2765E-11 0.000117 0.249873 39 39 0 0 1 -0.80-0.60 0.1395E-07 0.4352E-11 0.000212 0.249815 39 38 0 0 1 -0.80-0.40 0.6535E-08 0.4485E-11 0.000332 0.249760 38 38 0 0 1 -0.80-0.20 0.5434E-08 0.4337E-11 0.000449 0.249700 38 38 0 0 1 -0.80 0.00 0.3774E-08 0.4530E-11 0.000578 0.249634 38 38 0 0 1 -0.80 0.20 0.3957E-08 0.5212E-11 0.000720 0.249562 38 38 0 0 1 -0.80 0.40 0.3246E-08 0.5030E-11 0.000829 0.249484 39 38 0 0 1 -0.80 0.60 0.2442E-08 0.5068E-11 0.000986 0.249400 39 38 0 0 1 -0.80 0.80 0.1794E-08 0.4164E-11 0.001154 0.249272 39 37 0 0 1 -0.80 1.00 0.2078E-08 0.5342E-11 0.001333 0.249170 39 37 0 0 1 -0.60-0.80 0.4462E-08 0.2263E-11 0.000157 0.249901 39 39 0 0 1 -0.60-0.60 0.9562E-08 0.2755E-11 0.000253 0.249835 39 37 0 0 1 -0.60-0.40 0.9215E-08 0.5354E-11 0.000357 0.249798 39 39 0 0 1 -0.60-0.20 0.5260E-08 0.5668E-11 0.000494 0.249741 38 39 0 0 1 -0.60 0.00 0.5002E-08 0.3682E-11 0.000623 0.249661 38 38 0 0 1 -0.60 0.20 0.3589E-08 0.5043E-11 0.000763 0.249610 38 39 0 0 1 -0.60 0.40 0.2551E-08 0.5221E-11 0.000916 0.249536 38 39 0 0 1 -0.60 0.60 0.1806E-08 0.4345E-11 0.001080 0.249456 38 39 0 0 1 -0.60 0.80 0.2382E-08 0.4582E-11 0.001255 0.249337 38 38 0 0 1 -0.60 1.00 0.1806E-08 0.4762E-11 0.001442 0.249280 38 39 0 0 1 -0.40-0.80 0.2479E-08 0.2846E-11 0.000218 0.249916 36 38 0 0 1 -0.40-0.60 0.3762E-08 0.3157E-11 0.000282 0.249864 39 38 0 0 1 -0.40-0.40 0.2058E-08 0.1655E-11 0.000453 0.249817 36 39 0 0 1 -0.40-0.20 0.5304E-08 0.4190E-11 0.000554 0.249759 37 39 0 0 1 -0.40 0.00 0.3502E-08 0.4271E-11 0.000654 0.249697 38 39 0 0 1 -0.40 0.20 0.3390E-08 0.5694E-11 0.000793 0.249629 38 39 0 0 1 -0.40 0.40 0.3886E-08 0.7831E-11 0.000897 0.249555 39 39 0 0 1 -0.40 0.60 0.2173E-08 0.4584E-11 0.001052 0.249475 39 39 0 0 1 -0.40 0.80 0.2454E-08 0.6324E-11 0.001282 0.249390 38 39 0 0 1 -0.40 1.00 0.1503E-08 0.3851E-11 0.001468 0.249300 38 39 0 0 1 -0.20-0.80 0.9756E-08 0.3900E-11 0.000203 0.249928 39 38 0 0 1 -0.20-0.60 0.3871E-08 0.1730E-11 0.000297 0.249883 39 39 0 0 1 -0.20-0.40 0.1806E-08 0.1548E-11 0.000472 0.249787 36 35 0 0 1 -0.20-0.20 0.1971E-08 0.1269E-11 0.000572 0.249612 37 30 0 0 1 -0.20 0.00 0.2991E-08 0.3689E-11 0.000746 0.249693 36 38 0 0 1 -0.20 0.20 0.6044E-08 0.2925E-11 0.000769 0.249640 39 39 0 0 1 -0.20 0.40 0.3415E-08 0.4529E-11 0.000912 0.249567 39 39 0 0 1 -0.20 0.60 0.2225E-08 0.7563E-11 0.001066 0.249488 39 39 0 0 1 -0.20 0.80 0.1724E-08 0.4680E-11 0.001365 0.249403 37 39 0 0 1 -0.20 1.00 0.1680E-08 0.6943E-11 0.001481 0.249313 38 39 0 0 1 0.00-0.80 0.8596E-08 0.2733E-11 0.000207 0.249936 39 39 0 0 1 0.00-0.60 0.6012E-08 0.2124E-11 0.000300 0.249869 39 36 0 0 1 0.00-0.40 0.2548E-08 0.2319E-11 0.000475 0.249833 36 39 0 0 1 0.00-0.20 0.1074E-08 0.1467E-11 0.000679 0.249737 34 36 0 0 1 0.00 0.00 0.2320E-08 0.1701E-11 0.000673 0.249663 38 36 0 0 1 0.00 0.20 0.2903E-08 0.3882E-11 0.000771 0.249645 39 39 0 0 1 0.00 0.40 0.2965E-08 0.3873E-11 0.000914 0.249572 39 39 0 0 1 0.00 0.60 0.2324E-08 0.4794E-11 0.001067 0.249467 39 38 0 0 1 0.00 0.80 0.2645E-08 0.3561E-11 0.001231 0.249378 39 38 0 0 1 0.00 1.00 0.1563E-08 0.7327E-11 0.001406 0.249319 39 39 0 0 1 0.20-0.80 0.1156E-07 0.1751E-11 0.000198 0.249512 39 14 0 0 1 0.20-0.60 0.2506E-08 0.3945E-11 0.000339 0.249886 36 39 0 0 1 0.20-0.40 0.1874E-08 0.3972E-11 0.000518 0.249831 34 39 0 0 1 0.20-0.20 0.1633E-08 0.2323E-11 0.000596 0.249774 36 39 0 0 1 0.20 0.00 0.1236E-08 0.1610E-11 0.000737 0.249662 36 36 0 0 1 0.20 0.20 0.1735E-08 0.1537E-11 0.000761 0.249583 39 36 0 0 1 0.20 0.40 0.2242E-08 0.4512E-11 0.000903 0.249549 39 38 0 0 1 0.20 0.60 0.1759E-08 0.3931E-11 0.001055 0.249466 39 38 0 0 1 0.20 0.80 0.1555E-08 0.4947E-11 0.001219 0.249378 39 38 0 0 1 0.20 1.00 0.2268E-08 0.3294E-11 0.001393 0.249284 39 38 0 0 1 0.40-0.80 0.7297E-08 0.2231E-11 0.000186 0.249916 38 37 0 0 1 0.40-0.60 0.5785E-08 0.2185E-11 0.000269 0.249857 39 36 0 0 1 0.40-0.40 0.1944E-08 0.1996E-11 0.000462 0.249814 35 38 0 0 1 0.40-0.20 0.1648E-08 0.1876E-11 0.000569 0.249709 36 35 0 0 1 0.40 0.00 0.1366E-08 0.1238E-11 0.000608 0.249587 39 33 0 0 1 0.40 0.20 0.1287E-08 0.1517E-11 0.000738 0.249574 39 36 0 0 1 0.40 0.40 0.2050E-08 0.1965E-11 0.000879 0.249516 39 37 0 0 1 0.40 0.60 0.2275E-08 0.2126E-11 0.001085 0.249364 38 35 0 0 1 0.40 0.80 0.1925E-08 0.3872E-11 0.001194 0.249371 39 38 0 0 1 0.40 1.00 0.2171E-08 0.3159E-11 0.001368 0.249278 39 38 0 0 1 0.60-0.80 0.2241E-07 0.1910E-11 0.000143 0.249904 39 38 0 0 1 0.60-0.60 0.7314E-08 0.2448E-11 0.000234 0.249862 39 39 0 0 1 0.60-0.40 0.5031E-08 0.1689E-11 0.000340 0.249798 39 38 0 0 1 0.60-0.20 0.1660E-08 0.1918E-11 0.000528 0.249750 36 39 0 0 1 0.60 0.00 0.4912E-08 0.1870E-11 0.000573 0.249614 39 35 0 0 1 0.60 0.20 0.1806E-08 0.1505E-11 0.000739 0.249557 38 36 0 0 1 0.60 0.40 0.1579E-08 0.1397E-11 0.000844 0.249473 39 36 0 0 1 0.60 0.60 0.1494E-08 0.1670E-11 0.001102 0.249473 37 39 0 0 1 0.60 0.80 0.1176E-08 0.3591E-11 0.001217 0.249323 38 37 0 0 1 0.60 1.00 0.2178E-08 0.4986E-11 0.001399 0.249265 38 38 0 0 1 0.80-0.80 0.1258E-07 0.2100E-11 0.000107 0.249797 37 29 0 0 1 0.80-0.60 0.3773E-08 0.1696E-11 0.000206 0.249832 37 38 0 0 1 0.80-0.40 0.3549E-08 0.1738E-11 0.000293 0.249786 39 39 0 0 1 0.80-0.20 0.4153E-08 0.1473E-11 0.000405 0.249729 39 39 0 0 1 0.80 0.00 0.1812E-08 0.1927E-11 0.000614 0.249668 36 39 0 0 1 0.80 0.20 0.1668E-08 0.1306E-11 0.000726 0.249116 37 26 0 0 1 0.80 0.40 0.9052E-09 0.1283E-11 0.000881 0.248679 37 23 0 0 1 0.80 0.60 0.1421E-08 0.1368E-11 0.000947 0.249424 39 38 0 0 1 0.80 0.80 0.1980E-08 0.2058E-11 0.001108 0.249302 39 37 0 0 1 0.80 1.00 0.9316E-09 0.1836E-11 0.001347 0.249283 38 39 0 0 1 1.00-0.80 0.3457E-07 0.2524E-11 0.000044 0.249814 36 34 0 0 1 1.00-0.60 0.1608E-07 0.2778E-11 0.000128 0.249813 39 39 0 0 1 1.00-0.40 0.1315E-07 0.3039E-11 0.000234 0.249759 39 39 0 0 1 1.00-0.20 0.9271E-08 0.2771E-11 0.000346 0.249686 39 38 0 0 1 1.00 0.00 0.1697E-08 0.1250E-11 0.000545 0.249602 36 37 0 0 1 1.00 0.20 0.1331E-08 0.1196E-11 0.000778 0.249575 34 39 0 0 1 1.00 0.40 0.1961E-08 0.1802E-11 0.000815 0.249351 37 34 0 0 1 1.00 0.60 0.8124E-09 0.1262E-11 0.000932 0.249103 38 31 0 0 1 1.00 0.80 0.1064E-08 0.1382E-11 0.001160 0.249311 37 38 0 0 1 1.00 1.00 0.1353E-08 0.1635E-11 0.001282 0.248973 38 33 0 0 1 Y = 2.00 ALJ BEJ ERRA ERRB ALPHA BETA KA KB IERR IE IT -0.80-0.80 0.1761E-07 0.2742E-11 0.000125 0.249869 39 39 0 0 1 -0.80-0.60 0.1425E-07 0.4385E-11 0.000216 0.249813 39 38 0 0 1 -0.80-0.40 0.6547E-08 0.4488E-11 0.000333 0.249759 38 38 0 0 1 -0.80-0.20 0.5558E-08 0.4323E-11 0.000450 0.249700 38 38 0 0 1 -0.80 0.00 0.3444E-08 0.4539E-11 0.000579 0.249634 38 38 0 0 1 -0.80 0.20 0.3796E-08 0.5179E-11 0.000720 0.249562 38 38 0 0 1 -0.80 0.40 0.3211E-08 0.5027E-11 0.000829 0.249484 39 38 0 0 1 -0.80 0.60 0.2446E-08 0.5040E-11 0.000986 0.249400 39 38 0 0 1 -0.80 0.80 0.1979E-08 0.4219E-11 0.001154 0.249272 39 37 0 0 1 -0.80 1.00 0.2133E-08 0.5377E-11 0.001333 0.249170 39 37 0 0 1 -0.60-0.80 0.4220E-08 0.2242E-11 0.000167 0.249895 39 39 0 0 1 -0.60-0.60 0.9198E-08 0.2782E-11 0.000259 0.249832 39 37 0 0 1 -0.60-0.40 0.9072E-08 0.5343E-11 0.000360 0.249797 39 39 0 0 1 -0.60-0.20 0.5337E-08 0.5647E-11 0.000495 0.249740 38 39 0 0 1 -0.60 0.00 0.5217E-08 0.3671E-11 0.000623 0.249661 38 38 0 0 1 -0.60 0.20 0.3533E-08 0.5005E-11 0.000764 0.249610 38 39 0 0 1 -0.60 0.40 0.2668E-08 0.5232E-11 0.000916 0.249536 38 39 0 0 1 -0.60 0.60 0.1899E-08 0.4336E-11 0.001080 0.249456 38 39 0 0 1 -0.60 0.80 0.2443E-08 0.4606E-11 0.001255 0.249337 38 38 0 0 1 -0.60 1.00 0.1679E-08 0.4762E-11 0.001442 0.249280 38 39 0 0 1 -0.40-0.80 0.2629E-08 0.2846E-11 0.000232 0.249909 36 38 0 0 1 -0.40-0.60 0.4127E-08 0.3178E-11 0.000289 0.249860 39 38 0 0 1 -0.40-0.40 0.2352E-08 0.1657E-11 0.000457 0.249815 36 39 0 0 1 -0.40-0.20 0.5358E-08 0.4196E-11 0.000555 0.249759 37 39 0 0 1 -0.40 0.00 0.3289E-08 0.4261E-11 0.000654 0.249696 38 39 0 0 1 -0.40 0.20 0.3463E-08 0.5726E-11 0.000793 0.249628 38 39 0 0 1 -0.40 0.40 0.3956E-08 0.7862E-11 0.000897 0.249555 39 39 0 0 1 -0.40 0.60 0.2107E-08 0.4638E-11 0.001052 0.249475 39 39 0 0 1 -0.40 0.80 0.2336E-08 0.6342E-11 0.001282 0.249390 38 39 0 0 1 -0.40 1.00 0.1450E-08 0.3792E-11 0.001468 0.249300 38 39 0 0 1 -0.20-0.80 0.9454E-08 0.3879E-11 0.000215 0.249921 39 38 0 0 1 -0.20-0.60 0.3604E-08 0.1711E-11 0.000305 0.249879 39 39 0 0 1 -0.20-0.40 0.1796E-08 0.1528E-11 0.000476 0.249785 36 35 0 0 1 -0.20-0.20 0.2094E-08 0.1250E-11 0.000573 0.249611 37 30 0 0 1 -0.20 0.00 0.2958E-08 0.3772E-11 0.000747 0.249692 36 38 0 0 1 -0.20 0.20 0.5861E-08 0.2934E-11 0.000769 0.249640 39 39 0 0 1 -0.20 0.40 0.3338E-08 0.4545E-11 0.000912 0.249567 39 39 0 0 1 -0.20 0.60 0.2188E-08 0.7546E-11 0.001066 0.249488 39 39 0 0 1 -0.20 0.80 0.1813E-08 0.4708E-11 0.001365 0.249403 37 39 0 0 1 -0.20 1.00 0.1706E-08 0.6982E-11 0.001481 0.249313 38 39 0 0 1 0.00-0.80 0.8837E-08 0.2712E-11 0.000220 0.249929 39 39 0 0 1 0.00-0.60 0.5096E-08 0.2161E-11 0.000309 0.249863 39 36 0 0 1 0.00-0.40 0.2393E-08 0.2340E-11 0.000480 0.249831 36 39 0 0 1 0.00-0.20 0.1044E-08 0.1406E-11 0.000682 0.249735 34 36 0 0 1 0.00 0.00 0.2414E-08 0.1738E-11 0.000674 0.249663 38 36 0 0 1 0.00 0.20 0.2974E-08 0.3957E-11 0.000771 0.249645 39 39 0 0 1 0.00 0.40 0.2863E-08 0.3848E-11 0.000914 0.249572 39 39 0 0 1 0.00 0.60 0.2370E-08 0.4768E-11 0.001067 0.249467 39 38 0 0 1 0.00 0.80 0.2677E-08 0.3489E-11 0.001231 0.249378 39 38 0 0 1 0.00 1.00 0.1558E-08 0.7267E-11 0.001406 0.249319 39 39 0 0 1 0.20-0.80 0.1173E-07 0.1759E-11 0.000211 0.249444 39 14 0 0 1 0.20-0.60 0.2145E-08 0.3975E-11 0.000351 0.249881 36 39 0 0 1 0.20-0.40 0.1819E-08 0.3964E-11 0.000525 0.249829 34 39 0 0 1 0.20-0.20 0.1566E-08 0.2280E-11 0.000598 0.249773 36 39 0 0 1 0.20 0.00 0.1134E-08 0.1649E-11 0.000738 0.249661 36 36 0 0 1 0.20 0.20 0.1857E-08 0.1507E-11 0.000761 0.249583 39 36 0 0 1 0.20 0.40 0.2206E-08 0.4536E-11 0.000903 0.249549 39 38 0 0 1 0.20 0.60 0.1811E-08 0.3943E-11 0.001055 0.249466 39 38 0 0 1 0.20 0.80 0.1600E-08 0.4950E-11 0.001219 0.249378 39 38 0 0 1 0.20 1.00 0.2277E-08 0.3302E-11 0.001393 0.249284 39 38 0 0 1 0.40-0.80 0.6414E-08 0.2242E-11 0.000200 0.249908 38 37 0 0 1 0.40-0.60 0.5519E-08 0.2176E-11 0.000279 0.249850 39 36 0 0 1 0.40-0.40 0.1768E-08 0.1982E-11 0.000421 0.249811 37 38 0 0 1 0.40-0.20 0.1429E-08 0.1863E-11 0.000542 0.249707 37 35 0 0 1 0.40 0.00 0.1539E-08 0.1217E-11 0.000608 0.249586 39 33 0 0 1 0.40 0.20 0.1295E-08 0.1550E-11 0.000738 0.249573 39 36 0 0 1 0.40 0.40 0.2026E-08 0.1957E-11 0.000879 0.249516 39 37 0 0 1 0.40 0.60 0.2375E-08 0.2240E-11 0.001085 0.249364 38 35 0 0 1 0.40 0.80 0.1922E-08 0.3908E-11 0.001194 0.249371 39 38 0 0 1 0.40 1.00 0.2165E-08 0.3196E-11 0.001368 0.249278 39 38 0 0 1 0.60-0.80 0.2087E-07 0.1858E-11 0.000157 0.249896 39 38 0 0 1 0.60-0.60 0.6825E-08 0.2450E-11 0.000245 0.249856 39 39 0 0 1 0.60-0.40 0.5390E-08 0.1604E-11 0.000345 0.249795 39 38 0 0 1 0.60-0.20 0.1519E-08 0.1935E-11 0.000532 0.249749 36 39 0 0 1 0.60 0.00 0.4488E-08 0.1861E-11 0.000574 0.249614 39 35 0 0 1 0.60 0.20 0.1767E-08 0.1508E-11 0.000740 0.249557 38 36 0 0 1 0.60 0.40 0.1809E-08 0.1395E-11 0.000844 0.249473 39 36 0 0 1 0.60 0.60 0.1601E-08 0.1663E-11 0.001102 0.249473 37 39 0 0 1 0.60 0.80 0.1184E-08 0.3592E-11 0.001217 0.249323 38 37 0 0 1 0.60 1.00 0.2213E-08 0.4957E-11 0.001399 0.249265 38 38 0 0 1 0.80-0.80 0.1080E-07 0.2078E-11 0.000122 0.249783 37 29 0 0 1 0.80-0.60 0.3915E-08 0.1741E-11 0.000219 0.249826 37 38 0 0 1 0.80-0.40 0.3358E-08 0.1759E-11 0.000299 0.249783 39 39 0 0 1 0.80-0.20 0.4231E-08 0.1463E-11 0.000408 0.249728 39 39 0 0 1 0.80 0.00 0.1573E-08 0.1920E-11 0.000616 0.249667 36 39 0 0 1 0.80 0.20 0.1759E-08 0.1299E-11 0.000727 0.249332 37 30 0 0 1 0.80 0.40 0.8817E-09 0.1269E-11 0.000882 0.248678 37 23 0 0 1 0.80 0.60 0.1372E-08 0.1388E-11 0.000947 0.249424 39 38 0 0 1 0.80 0.80 0.1853E-08 0.2016E-11 0.001108 0.249302 39 37 0 0 1 0.80 1.00 0.9247E-09 0.1865E-11 0.001347 0.249283 38 39 0 0 1 1.00-0.80 0.2314E-07 0.2544E-11 0.000060 0.249804 36 34 0 0 1 1.00-0.60 0.1395E-07 0.2727E-11 0.000140 0.249806 39 39 0 0 1 1.00-0.40 0.1231E-07 0.3068E-11 0.000240 0.249756 39 39 0 0 1 1.00-0.20 0.9241E-08 0.2790E-11 0.000349 0.249685 39 38 0 0 1 1.00 0.00 0.1719E-08 0.1208E-11 0.000546 0.249601 36 37 0 0 1 1.00 0.20 0.1407E-08 0.1197E-11 0.000779 0.249575 34 39 0 0 1 1.00 0.40 0.1870E-08 0.1793E-11 0.000815 0.249350 37 34 0 0 1 1.00 0.60 0.9529E-09 0.1229E-11 0.000887 0.249103 39 31 0 0 1 1.00 0.80 0.1139E-08 0.1409E-11 0.001160 0.249311 37 38 0 0 1 1.00 1.00 0.1285E-08 0.1630E-11 0.001282 0.248973 38 33 0 0 1 Y = 4.00 ALJ BEJ ERRA ERRB ALPHA BETA KA KB IERR IE IT -0.80-0.80 0.1630E-07 0.2738E-11 0.000129 0.249867 39 39 0 0 1 -0.80-0.60 0.1420E-07 0.4387E-11 0.000217 0.249812 39 38 0 0 1 -0.80-0.40 0.6863E-08 0.4464E-11 0.000334 0.249759 38 38 0 0 1 -0.80-0.20 0.5435E-08 0.4331E-11 0.000450 0.249700 38 38 0 0 1 -0.80 0.00 0.3539E-08 0.4508E-11 0.000579 0.249634 38 38 0 0 1 -0.80 0.20 0.4056E-08 0.5192E-11 0.000720 0.249562 38 38 0 0 1 -0.80 0.40 0.3188E-08 0.4984E-11 0.000829 0.249484 39 38 0 0 1 -0.80 0.60 0.2493E-08 0.5068E-11 0.000986 0.249400 39 38 0 0 1 -0.80 0.80 0.2001E-08 0.4214E-11 0.001154 0.249272 39 37 0 0 1 -0.80 1.00 0.2067E-08 0.5416E-11 0.001333 0.249170 39 37 0 0 1 -0.60-0.80 0.3929E-08 0.2226E-11 0.000192 0.249892 37 39 0 0 1 -0.60-0.60 0.9620E-08 0.2765E-11 0.000261 0.249830 39 37 0 0 1 -0.60-0.40 0.8958E-08 0.5327E-11 0.000361 0.249796 39 39 0 0 1 -0.60-0.20 0.5104E-08 0.5666E-11 0.000496 0.249740 38 39 0 0 1 -0.60 0.00 0.5020E-08 0.3667E-11 0.000624 0.249678 38 39 0 0 1 -0.60 0.20 0.3584E-08 0.5023E-11 0.000764 0.249610 38 39 0 0 1 -0.60 0.40 0.2492E-08 0.5184E-11 0.000916 0.249536 38 39 0 0 1 -0.60 0.60 0.1889E-08 0.4347E-11 0.001080 0.249456 38 39 0 0 1 -0.60 0.80 0.2332E-08 0.4522E-11 0.001255 0.249337 38 38 0 0 1 -0.60 1.00 0.1843E-08 0.4769E-11 0.001442 0.249280 38 39 0 0 1 -0.40-0.80 0.2266E-08 0.2889E-11 0.000240 0.249906 36 38 0 0 1 -0.40-0.60 0.3162E-08 0.3158E-11 0.000343 0.249858 36 38 0 0 1 -0.40-0.40 0.2118E-08 0.1662E-11 0.000459 0.249815 36 39 0 0 1 -0.40-0.20 0.5081E-08 0.4203E-11 0.000556 0.249758 37 39 0 0 1 -0.40 0.00 0.3312E-08 0.4234E-11 0.000654 0.249696 38 39 0 0 1 -0.40 0.20 0.3416E-08 0.5719E-11 0.000794 0.249628 38 39 0 0 1 -0.40 0.40 0.4002E-08 0.7860E-11 0.000897 0.249555 39 39 0 0 1 -0.40 0.60 0.2190E-08 0.4604E-11 0.001052 0.249475 39 39 0 0 1 -0.40 0.80 0.2444E-08 0.6310E-11 0.001282 0.249390 38 39 0 0 1 -0.40 1.00 0.1435E-08 0.3851E-11 0.001468 0.249300 38 39 0 0 1 -0.20-0.80 0.9310E-08 0.3836E-11 0.000222 0.249917 39 38 0 0 1 -0.20-0.60 0.3235E-08 0.1780E-11 0.000310 0.249876 39 39 0 0 1 -0.20-0.40 0.1661E-08 0.1537E-11 0.000479 0.249783 36 35 0 0 1 -0.20-0.20 0.1883E-08 0.1272E-11 0.000574 0.249610 37 30 0 0 1 -0.20 0.00 0.2929E-08 0.3689E-11 0.000747 0.249692 36 38 0 0 1 -0.20 0.20 0.5859E-08 0.2900E-11 0.000769 0.249640 39 39 0 0 1 -0.20 0.40 0.3246E-08 0.4608E-11 0.000912 0.249567 39 39 0 0 1 -0.20 0.60 0.2217E-08 0.7566E-11 0.001182 0.249488 37 39 0 0 1 -0.20 0.80 0.1822E-08 0.4658E-11 0.001365 0.249403 37 39 0 0 1 -0.20 1.00 0.1708E-08 0.7000E-11 0.001481 0.249313 38 39 0 0 1 0.00-0.80 0.8341E-08 0.2684E-11 0.000227 0.249925 39 39 0 0 1 0.00-0.60 0.5039E-08 0.2122E-11 0.000314 0.249860 39 36 0 0 1 0.00-0.40 0.2538E-08 0.2387E-11 0.000483 0.249830 36 39 0 0 1 0.00-0.20 0.1147E-08 0.1426E-11 0.000683 0.249735 34 36 0 0 1 0.00 0.00 0.2258E-08 0.1739E-11 0.000674 0.249663 38 36 0 0 1 0.00 0.20 0.2827E-08 0.3928E-11 0.000772 0.249645 39 39 0 0 1 0.00 0.40 0.3083E-08 0.3866E-11 0.000914 0.249572 39 39 0 0 1 0.00 0.60 0.2491E-08 0.4775E-11 0.001067 0.249467 39 38 0 0 1 0.00 0.80 0.2699E-08 0.3493E-11 0.001231 0.249378 39 38 0 0 1 0.00 1.00 0.1503E-08 0.7277E-11 0.001406 0.249319 39 39 0 0 1 0.20-0.80 0.1148E-07 0.1750E-11 0.000219 0.249400 39 14 0 0 1 0.20-0.60 0.1882E-08 0.3957E-11 0.000358 0.249878 36 39 0 0 1 0.20-0.40 0.1952E-08 0.3941E-11 0.000425 0.249828 38 39 0 0 1 0.20-0.20 0.1559E-08 0.2284E-11 0.000599 0.249772 36 39 0 0 1 0.20 0.00 0.1276E-08 0.1641E-11 0.000739 0.249661 36 36 0 0 1 0.20 0.20 0.1799E-08 0.1521E-11 0.000761 0.249582 39 36 0 0 1 0.20 0.40 0.2232E-08 0.4524E-11 0.000903 0.249549 39 38 0 0 1 0.20 0.60 0.1675E-08 0.3968E-11 0.001055 0.249466 39 38 0 0 1 0.20 0.80 0.1524E-08 0.4938E-11 0.001219 0.249378 39 38 0 0 1 0.20 1.00 0.2247E-08 0.3274E-11 0.001393 0.249284 39 38 0 0 1 0.40-0.80 0.6247E-08 0.2256E-11 0.000209 0.249904 38 37 0 0 1 0.40-0.60 0.5283E-08 0.2198E-11 0.000284 0.249847 39 36 0 0 1 0.40-0.40 0.1757E-08 0.2016E-11 0.000473 0.249809 35 38 0 0 1 0.40-0.20 0.1546E-08 0.1881E-11 0.000574 0.249707 36 35 0 0 1 0.40 0.00 0.1265E-08 0.1219E-11 0.000609 0.249585 39 33 0 0 1 0.40 0.20 0.1207E-08 0.1593E-11 0.000739 0.249573 39 36 0 0 1 0.40 0.40 0.2069E-08 0.1984E-11 0.000879 0.249516 39 37 0 0 1 0.40 0.60 0.2294E-08 0.2181E-11 0.001085 0.249364 38 35 0 0 1 0.40 0.80 0.1839E-08 0.3887E-11 0.001194 0.249371 39 38 0 0 1 0.40 1.00 0.2188E-08 0.3138E-11 0.001368 0.249278 39 38 0 0 1 0.60-0.80 0.2027E-07 0.1905E-11 0.000165 0.249892 39 38 0 0 1 0.60-0.60 0.6410E-08 0.2448E-11 0.000250 0.249853 39 39 0 0 1 0.60-0.40 0.5485E-08 0.1617E-11 0.000348 0.249793 39 38 0 0 1 0.60-0.20 0.1505E-08 0.1913E-11 0.000456 0.249748 39 39 0 0 1 0.60 0.00 0.4534E-08 0.1845E-11 0.000574 0.249613 39 35 0 0 1 0.60 0.20 0.1605E-08 0.1505E-11 0.000740 0.249557 38 36 0 0 1 0.60 0.40 0.1716E-08 0.1382E-11 0.000844 0.249473 39 36 0 0 1 0.60 0.60 0.1537E-08 0.1687E-11 0.001102 0.249473 37 39 0 0 1 0.60 0.80 0.1123E-08 0.3590E-11 0.001217 0.249323 38 37 0 0 1 0.60 1.00 0.2186E-08 0.5004E-11 0.001399 0.249265 38 38 0 0 1 0.80-0.80 0.1047E-07 0.2116E-11 0.000132 0.249775 37 29 0 0 1 0.80-0.60 0.3689E-08 0.1717E-11 0.000226 0.249823 37 38 0 0 1 0.80-0.40 0.2617E-08 0.1745E-11 0.000302 0.249782 39 39 0 0 1 0.80-0.20 0.4311E-08 0.1456E-11 0.000409 0.249713 39 38 0 0 1 0.80 0.00 0.1813E-08 0.1902E-11 0.000616 0.249667 36 39 0 0 1 0.80 0.20 0.1905E-08 0.1287E-11 0.000727 0.249331 37 30 0 0 1 0.80 0.40 0.9286E-09 0.1272E-11 0.000882 0.248677 37 23 0 0 1 0.80 0.60 0.1409E-08 0.1369E-11 0.000947 0.249424 39 38 0 0 1 0.80 0.80 0.1937E-08 0.2050E-11 0.001108 0.249302 39 37 0 0 1 0.80 1.00 0.8591E-09 0.1847E-11 0.001347 0.249283 38 39 0 0 1 1.00-0.80 0.2078E-07 0.2603E-11 0.000067 0.249829 37 37 0 0 1 1.00-0.60 0.1346E-07 0.2734E-11 0.000146 0.249803 39 39 0 0 1 1.00-0.40 0.1253E-07 0.3013E-11 0.000243 0.249754 39 39 0 0 1 1.00-0.20 0.9275E-08 0.2790E-11 0.000350 0.249684 39 38 0 0 1 1.00 0.00 0.1736E-08 0.1196E-11 0.000519 0.249600 37 37 0 0 1 1.00 0.20 0.1327E-08 0.1175E-11 0.000779 0.249574 34 39 0 0 1 1.00 0.40 0.1917E-08 0.1785E-11 0.000816 0.249350 37 34 0 0 1 1.00 0.60 0.9007E-09 0.1226E-11 0.000887 0.249103 39 31 0 0 1 1.00 0.80 0.1063E-08 0.1394E-11 0.001160 0.249311 37 38 0 0 1 1.00 1.00 0.1288E-08 0.1646E-11 0.001282 0.248973 38 33 0 0 1 Y = 8.00 ALJ BEJ ERRA ERRB ALPHA BETA KA KB IERR IE IT -0.80-0.80 0.1572E-07 0.2749E-11 0.000131 0.249866 39 39 0 0 1 -0.80-0.60 0.1385E-07 0.4401E-11 0.000218 0.249812 39 38 0 0 1 -0.80-0.40 0.6623E-08 0.4474E-11 0.000334 0.249759 38 38 0 0 1 -0.80-0.20 0.5360E-08 0.4311E-11 0.000450 0.249700 38 38 0 0 1 -0.80 0.00 0.3534E-08 0.4499E-11 0.000579 0.249634 38 38 0 0 1 -0.80 0.20 0.3980E-08 0.5160E-11 0.000720 0.249562 38 38 0 0 1 -0.80 0.40 0.3168E-08 0.5029E-11 0.000829 0.249484 39 38 0 0 1 -0.80 0.60 0.2487E-08 0.5101E-11 0.000986 0.249400 39 38 0 0 1 -0.80 0.80 0.1897E-08 0.4198E-11 0.001154 0.249272 39 37 0 0 1 -0.80 1.00 0.2219E-08 0.5421E-11 0.001333 0.249170 39 37 0 0 1 -0.60-0.80 0.4423E-08 0.2253E-11 0.000196 0.249891 37 39 0 0 1 -0.60-0.60 0.9326E-08 0.2728E-11 0.000263 0.249829 39 37 0 0 1 -0.60-0.40 0.8921E-08 0.5345E-11 0.000361 0.249796 39 39 0 0 1 -0.60-0.20 0.5396E-08 0.5637E-11 0.000496 0.249740 38 39 0 0 1 -0.60 0.00 0.5101E-08 0.3648E-11 0.000624 0.249661 38 38 0 0 1 -0.60 0.20 0.3590E-08 0.5039E-11 0.000764 0.249610 38 39 0 0 1 -0.60 0.40 0.2611E-08 0.5226E-11 0.000916 0.249536 38 39 0 0 1 -0.60 0.60 0.1794E-08 0.4309E-11 0.001080 0.249456 38 39 0 0 1 -0.60 0.80 0.2486E-08 0.4583E-11 0.001255 0.249337 38 38 0 0 1 -0.60 1.00 0.1790E-08 0.4816E-11 0.001442 0.249280 38 39 0 0 1 -0.40-0.80 0.2191E-08 0.2824E-11 0.000244 0.249904 36 38 0 0 1 -0.40-0.60 0.3668E-08 0.3161E-11 0.000294 0.249857 39 38 0 0 1 -0.40-0.40 0.1916E-08 0.1666E-11 0.000460 0.249814 36 39 0 0 1 -0.40-0.20 0.5397E-08 0.4222E-11 0.000556 0.249758 37 39 0 0 1 -0.40 0.00 0.3378E-08 0.4254E-11 0.000654 0.249696 38 39 0 0 1 -0.40 0.20 0.3495E-08 0.5693E-11 0.000794 0.249628 38 39 0 0 1 -0.40 0.40 0.3931E-08 0.7849E-11 0.000897 0.249555 39 39 0 0 1 -0.40 0.60 0.2177E-08 0.4598E-11 0.001052 0.249475 39 39 0 0 1 -0.40 0.80 0.2376E-08 0.6365E-11 0.001282 0.249390 38 39 0 0 1 -0.40 1.00 0.1519E-08 0.3824E-11 0.001468 0.249300 38 39 0 0 1 -0.20-0.80 0.1007E-07 0.3829E-11 0.000226 0.249915 39 38 0 0 1 -0.20-0.60 0.3119E-08 0.1703E-11 0.000312 0.249875 39 39 0 0 1 -0.20-0.40 0.1950E-08 0.1533E-11 0.000480 0.249783 36 35 0 0 1 -0.20-0.20 0.1911E-08 0.1228E-11 0.000575 0.249729 37 36 0 0 1 -0.20 0.00 0.2748E-08 0.3725E-11 0.000747 0.249692 36 38 0 0 1 -0.20 0.20 0.5976E-08 0.2912E-11 0.000769 0.249621 39 38 0 0 1 -0.20 0.40 0.3340E-08 0.4587E-11 0.000912 0.249567 39 39 0 0 1 -0.20 0.60 0.2197E-08 0.7527E-11 0.001182 0.249488 37 39 0 0 1 -0.20 0.80 0.1727E-08 0.4688E-11 0.001365 0.249403 37 39 0 0 1 -0.20 1.00 0.1720E-08 0.6961E-11 0.001481 0.249313 38 39 0 0 1 0.00-0.80 0.8465E-08 0.2673E-11 0.000231 0.249923 39 39 0 0 1 0.00-0.60 0.5025E-08 0.2129E-11 0.000316 0.249858 39 36 0 0 1 0.00-0.40 0.2434E-08 0.2369E-11 0.000484 0.249830 36 39 0 0 1 0.00-0.20 0.1234E-08 0.1427E-11 0.000684 0.249735 34 36 0 0 1 0.00 0.00 0.2187E-08 0.1706E-11 0.000675 0.249663 38 36 0 0 1 0.00 0.20 0.2872E-08 0.3978E-11 0.000772 0.249645 39 39 0 0 1 0.00 0.40 0.3014E-08 0.3874E-11 0.000914 0.249572 39 39 0 0 1 0.00 0.60 0.2452E-08 0.4773E-11 0.001067 0.249467 39 38 0 0 1 0.00 0.80 0.2697E-08 0.3566E-11 0.001231 0.249378 39 38 0 0 1 0.00 1.00 0.1542E-08 0.7264E-11 0.001406 0.249319 39 39 0 0 1 0.20-0.80 0.1115E-07 0.1760E-11 0.000223 0.249375 39 14 0 0 1 0.20-0.60 0.1877E-08 0.3962E-11 0.000361 0.249877 36 39 0 0 1 0.20-0.40 0.1980E-08 0.3965E-11 0.000426 0.249827 38 39 0 0 1 0.20-0.20 0.1652E-08 0.2314E-11 0.000568 0.249772 37 39 0 0 1 0.20 0.00 0.1257E-08 0.1646E-11 0.000739 0.249661 36 36 0 0 1 0.20 0.20 0.1872E-08 0.1543E-11 0.000761 0.249582 39 36 0 0 1 0.20 0.40 0.2139E-08 0.4523E-11 0.000903 0.249549 39 38 0 0 1 0.20 0.60 0.1705E-08 0.3928E-11 0.001055 0.249466 39 38 0 0 1 0.20 0.80 0.1645E-08 0.4899E-11 0.001219 0.249378 39 38 0 0 1 0.20 1.00 0.2261E-08 0.3281E-11 0.001393 0.249284 39 38 0 0 1 0.40-0.80 0.5949E-08 0.2267E-11 0.000213 0.249901 38 37 0 0 1 0.40-0.60 0.5022E-08 0.2183E-11 0.000287 0.249845 39 36 0 0 1 0.40-0.40 0.1841E-08 0.2012E-11 0.000425 0.249809 37 38 0 0 1 0.40-0.20 0.1555E-08 0.1844E-11 0.000544 0.249706 37 35 0 0 1 0.40 0.00 0.1195E-08 0.1220E-11 0.000609 0.249585 39 33 0 0 1 0.40 0.20 0.1230E-08 0.1567E-11 0.000739 0.249573 39 36 0 0 1 0.40 0.40 0.2072E-08 0.1998E-11 0.000879 0.249516 39 37 0 0 1 0.40 0.60 0.2309E-08 0.2193E-11 0.001085 0.249364 38 35 0 0 1 0.40 0.80 0.2017E-08 0.3910E-11 0.001194 0.249371 39 38 0 0 1 0.40 1.00 0.2168E-08 0.3171E-11 0.001368 0.249278 39 38 0 0 1 0.60-0.80 0.1947E-07 0.1876E-11 0.000169 0.249187 39 14 0 0 1 0.60-0.60 0.6137E-08 0.2457E-11 0.000253 0.249852 39 39 0 0 1 0.60-0.40 0.5603E-08 0.1657E-11 0.000349 0.249792 39 38 0 0 1 0.60-0.20 0.1545E-08 0.1926E-11 0.000534 0.249748 36 39 0 0 1 0.60 0.00 0.4683E-08 0.1866E-11 0.000574 0.249613 39 35 0 0 1 0.60 0.20 0.1607E-08 0.1509E-11 0.000740 0.249557 38 36 0 0 1 0.60 0.40 0.1640E-08 0.1357E-11 0.000844 0.249473 39 36 0 0 1 0.60 0.60 0.1605E-08 0.1673E-11 0.001102 0.249472 37 39 0 0 1 0.60 0.80 0.1224E-08 0.3569E-11 0.001217 0.249323 38 37 0 0 1 0.60 1.00 0.2255E-08 0.4997E-11 0.001399 0.249265 38 38 0 0 1 0.80-0.80 0.1071E-07 0.2051E-11 0.000137 0.249770 37 29 0 0 1 0.80-0.60 0.4358E-08 0.1726E-11 0.000230 0.249821 37 38 0 0 1 0.80-0.40 0.3095E-08 0.1728E-11 0.000303 0.249781 39 39 0 0 1 0.80-0.20 0.4488E-08 0.1481E-11 0.000410 0.249727 39 39 0 0 1 0.80 0.00 0.1631E-08 0.1864E-11 0.000617 0.249667 36 39 0 0 1 0.80 0.20 0.1762E-08 0.1290E-11 0.000727 0.249331 37 30 0 0 1 0.80 0.40 0.8006E-09 0.1294E-11 0.001168 0.248677 32 23 0 0 1 0.80 0.60 0.1282E-08 0.1379E-11 0.000947 0.249424 39 38 0 0 1 0.80 0.80 0.1921E-08 0.2055E-11 0.001108 0.249302 39 37 0 0 1 0.80 1.00 0.8812E-09 0.1850E-11 0.001347 0.249283 38 39 0 0 1 1.00-0.80 0.1981E-07 0.2590E-11 0.000072 0.249827 37 37 0 0 1 1.00-0.60 0.1348E-07 0.2750E-11 0.000149 0.249802 39 39 0 0 1 1.00-0.40 0.1201E-07 0.3048E-11 0.000245 0.249753 39 39 0 0 1 1.00-0.20 0.9000E-08 0.2781E-11 0.000351 0.249683 39 38 0 0 1 1.00 0.00 0.1671E-08 0.1163E-11 0.000519 0.249600 37 37 0 0 1 1.00 0.20 0.1282E-08 0.1176E-11 0.000779 0.249502 34 36 0 0 1 1.00 0.40 0.1878E-08 0.1732E-11 0.000816 0.249350 37 34 0 0 1 1.00 0.60 0.8384E-09 0.1258E-11 0.000887 0.249103 39 31 0 0 1 1.00 0.80 0.1113E-08 0.1370E-11 0.001160 0.249311 37 38 0 0 1 1.00 1.00 0.1417E-08 0.1636E-11 0.001282 0.248973 38 33 0 0 1 C-END-OF-FILE cat < test6.f c c program test6 c c external qlag,dqlag dimension a(100),b(100),e(100),xp(1),yp(1),endl(1),endr(1), *xfer(1),wfer(1),alpha(40),beta(40),be(40),x(100),w(100), *xm(200),wm(200),p0(200),p1(200),p2(200) double precision d1mach,da(300),db(300),de(300),depsma,dxp(1), *dyp(1),dendl(1),dendr(1),dxfer(1),dwfer(1),dalpha(40),dbeta(40), *dbe(40),dx(300),dw(300),dxm(600),dwm(600),dp0(600),dp1(600), *dp2(600),deps logical finl,finr,finld,finrd common/s/a,b,e,epsma common/d/da,db,de,depsma c c This test generates in single and double precision the first 40 c recursion coefficients of the orthogonal polynomials belonging to c the logistic density function c c exp(-x)/((1+exp(-x))**2) on (-oo, oo). c c It prints the double-precision beta-coefficients (the alpha's being c all zero) along with the absolute and relative errors of the alpha- c coefficients resp. beta-coefficients. c write(*,1) 1 format(/) c c epsma and depsma are the machine single and double precision. c iq=1 idelta=1 irout=1 epsma=r1mach(3) depsma=d1mach(3) n=40 mc=2 mp=0 ncapm=100 ncapmm=mc*ncapm+mp ncpmd=300 ncpmmd=mc*ncpmd+mp eps=5000.*epsma deps=1000.*depsma c c Compute the desired coefficients. On machines with limited exponent c range, some of the weights in the Gauss-Laguerre quadrature rule may c underflow. c call mcdis(n,ncapm,mc,mp,xp,yp,qlag,eps,iq,idelta,irout,finl, * finr,endl,endr,xfer,wfer,alpha,beta,ncap,kount,ierr,ie,be,x,w, * xm,wm,p0,p1,p2) call dmcdis(n,ncpmd,mc,mp,dxp,dyp,dqlag,deps,iq,idelta,irout, * finld,finrd,dendl,dendr,dxfer,dwfer,dalpha,dbeta,ncapd,kountd, * ierrd,ied,dbe,dx,dw,dxm,dwm,dp0,dp1,dp2) write(*,2) ncap,kount,ierr,ie 2 format(/1x,'ncap = ',i3,' kount = ',i2,' ierr = ',i3,' ie = ',i5) write(*,3) ncapd,kountd,ierrd,ied 3 format(1x,'ncapd= ',i3,' kountd= ',i2,' ierrd= ',i3,' ied= ',i5/) c c Print the results. c write(*,4) 4 format(/5x,'k',13x,'dbeta(k)',17x,'erra',8x,'errb'/) do 10 k=1,n km1=k-1 erra=abs(alpha(k)) errb=abs(sngl((dble(beta(k))-dbeta(k))/dbeta(k))) if(ied.eq.0 .or. km1.lt.ied) then if(ie.eq.0 .or. km1.lt.ie) then write(*,5) km1,dbeta(k),erra,errb 5 format(1x,i5,d33.25,2e12.4) else write(*,6) km1,dbeta(k) 6 format(1x,i5,d33.25) end if end if 10 continue stop end subroutine qlag(n,x,w,i,ierr) dimension x(n),w(n),a(100),b(100),e(100) common/s/a,b,e,epsma call recur(n,7,0.,0.,a,b,ierr) call gauss(n,a,b,epsma,x,w,ierr,e) do 10 k=1,n w(k)=w(k)/((1.+exp(-x(k)))**2) if(i.eq.1) x(k)=-x(k) 10 continue return end subroutine dqlag(n,dx,dw,i,ierr) double precision dx(n),dw(n),da(300),db(300),de(300),depsma common/d/da,db,de,depsma call drecur(n,7,0.d0,0.d0,da,db,ierr) call dgauss(n,da,db,depsma,dx,dw,ierr,de) do 10 k=1,n dw(k)=dw(k)/((1.d0+dexp(-dx(k)))**2) if(i.eq.1) dx(k)=-dx(k) 10 continue return end function wf(x,i) c c This is a dummy function. It is never called, since the routine c qgp in mcdis which requires wf is not activated in this test. c wf=0. return end double precision function dwf(dx,i) double precision dx c c This is a dummy function. It is never called, since the routine c dqgp in dmcdis which requires dwf is not activated in this test. c dwf=0.d0 return end C-END-OF-FILE cat < test6.out output of test6, using sti in mcdis: NCAP = 81 KOUNT = 1 IERR = 0 IE = 0 NCAPD= 281 KOUNTD= 5 IERRD= 0 IED= 0 K DBETA(K) ERRA ERRB 0 0.1000000000000000000000000D+01 0.4572E-12 0.1918E-12 1 0.3289868133696452872944830D+01 0.1682E-12 0.5641E-12 2 0.1052757802782864919342346D+02 0.4785E-12 0.9918E-12 3 0.2284108447109251566073125D+02 0.3828E-12 0.1356E-11 4 0.4010505915363294930827983D+02 0.9371E-12 0.1785E-11 5 0.6230810859273584986637936D+02 0.3099E-12 0.1894E-11 6 0.8944760352315950188817832D+02 0.2187E-11 0.2190E-11 7 0.1215226675231566668913929D+03 0.1059E-11 0.2677E-11 8 0.1585329397131843643244944D+03 0.5557E-12 0.2592E-11 9 0.2004782491503011823472851D+03 0.1216E-11 0.2496E-11 10 0.2473585062929663814244233D+03 0.5890E-12 0.2748E-11 11 0.2991736605307438913837594D+03 0.1123E-11 0.2999E-11 12 0.3559236814973720701220035D+03 0.1888E-11 0.3470E-11 13 0.4176085500733528466852324D+03 0.6690E-12 0.3553E-11 14 0.4842282537321185194139793D+03 0.1307E-12 0.3267E-11 15 0.5557827839879296775066697D+03 0.1732E-12 0.2915E-11 16 0.6322721349264830952531155D+03 0.4290E-11 0.3314E-11 17 0.7136963023232764685746108D+03 0.4668E-11 0.3295E-11 18 0.8000552830955648728731810D+03 0.7079E-11 0.3430E-11 19 0.8913490749510508001144349D+03 0.4948E-11 0.3246E-11 20 0.9875776761565336954431009D+03 0.6420E-11 0.3269E-11 21 0.1088741085381882900481878D+04 0.4585E-11 0.3819E-11 22 0.1194839301592552347603975D+04 0.7522E-11 0.4334E-11 23 0.1305872323974112153784048D+04 0.3161E-12 0.4939E-11 24 0.1421840151878342616206006D+04 0.9828E-12 0.4610E-11 25 0.1542742784784125934566716D+04 0.6088E-11 0.4137E-11 26 0.1668580222268668421827788D+04 0.3772E-11 0.4112E-11 27 0.1799352463986047970412357D+04 0.3564E-11 0.4120E-11 28 0.1935059509651030561792131D+04 0.1082E-11 0.4268E-11 29 0.2075701359026726926341920D+04 0.2666E-11 0.4240E-11 30 0.2221278011915082100932464D+04 0.6107E-11 0.4028E-11 31 0.2371789468149478418169307D+04 0.2960E-11 0.3779E-11 32 0.2527235727588931697949449D+04 0.2994E-11 0.3821E-11 33 0.2687616790113500175110635D+04 0.2419E-11 0.3507E-11 34 0.2852932655620624949006880D+04 0.2275E-11 0.3408E-11 35 0.3023183324022192034576139D+04 0.1122E-10 0.4112E-11 36 0.3198368795242157855668978D+04 0.1606E-10 0.3530E-11 37 0.3378489069214617979622551D+04 0.2115E-10 0.3412E-11 38 0.3563544145882226991002956D+04 0.1908E-10 0.4372E-11 39 0.3753534025194898387722354D+04 0.2482E-10 0.4533E-11 C-END-OF-FILE cat < test7.f c c program test7 c c external quad,dquad dimension endl(4),endr(4),xp(1),yp(1),xfer(100),wfer(100), *alpha(40),beta(40),be(40),x(100),w(100),xm(400),wm(400),p0(400), *p1(400),p2(400) double precision d1mach,depsma,dendl(4),dendr(4),dxp(1),dyp(1), *dxfer(250),dwfer(250),dalpha(40),dbeta(40),dbe(40),dx(250), *dw(250),dxm(1000),dwm(1000),dp0(1000),dp1(1000),dp2(1000),di,deps logical finl,finr,finld,finrd c c This test generates in single and double precision the first 40 c recurrence coefficients of the orthogonal polynomials for the half- c range Hermite weight function c c exp(-x**2) on (0,oo). c c Printed are the double-precision values of the alpha- and beta- c coefficients along with the respective relative errors of the single- c precision values. c finl=.true. finr=.false. finld=.true. finrd=.false. epsma=r1mach(3) depsma=d1mach(3) c c epsma and depsma are the machine single and double precision. c iq=2 idelta=1 irout=1 n=40 mc=4 mcd=4 mp=0 ncapm=100 ncpmd=250 c c Set up the partition for the discretization of the inner product. c do 10 i=1,4 fi=real(i) di=dble(fi) endl(i)=3.*(fi-1.) endr(i)=3.*fi dendl(i)=3.d0*(di-1.d0) dendr(i)=3.d0*di 10 continue eps=50.*epsma deps=1000.*depsma c c Compute the desired recursion coefficients by the multiple-component c discretization procedure. On the third and fourth subinterval of the c partition, the quadrature weights produced by qgp resp. dqgp may c underflow, on the fourth subinterval even on machines with large c exponent range. c call mcdis(n,ncapm,mc,mp,xp,yp,quad,eps,iq,idelta,irout,finl, * finr,endl,endr,xfer,wfer,alpha,beta,ncap,kount,ierr,ie,be,x,w, * xm,wm,p0,p1,p2) call dmcdis(n,ncpmd,mcd,mp,dxp,dyp,dquad,deps,iq,idelta,irout, * finld,finrd,dendl,dendr,dxfer,dwfer,dalpha,dbeta,ncapd,kountd, * ierrd,ied,dbe,dx,dw,dxm,dwm,dp0,dp1,dp2) write(*,1) ncap,kount,ierr,ie 1 format(/1x,'ncap = ',i3,' kount = ',i2,' ierr = ',i3,' ie = ',i3) write(*,2) ncapd,kountd,ierrd,ied 2 format(1x,'ncapd =',i3,' kountd =',i2,' ierrd =',i3,' ied =',i3/) c c Print the results. c write(*,3) 3 format(/5x,'k',13x,'dalpha(k)',25x,'dbeta(k)') write(*,4) 4 format(11x,'erra',29x,'errb') do 20 k=1,n km1=k-1 erra=abs(sngl((dble(alpha(k))-dalpha(k))/dalpha(k))) errb=abs(sngl((dble(beta(k))-dbeta(k))/dbeta(k))) write(*,5) km1,dalpha(k),dbeta(k) 5 format(1x,i5,2d33.25) write(*,6) erra,errb 6 format(6x,e12.4,21x,e12.4) 20 continue stop end subroutine quad(n,x,w,i,ierr) dimension x(n),w(n) print *,' User has selected the wrong SP-quadrature routine.' stop end subroutine dquad(n,dx,dw,i,ierr) double precision dx(n),dw(n) print *,' User has selected the wrong DP-quadrature routine.' stop end function wf(x,i) wf=exp(-x*x) return end double precision function dwf(dx,i) double precision dx dwf=dexp(-dx*dx) return end C-END-OF-FILE cat < test7.out output of test7: NCAP = 81 KOUNT = 1 IERR = 0 IE = 0 NCAPD =201 KOUNTD = 4 IERRD = 0 IED = 0 K DALPHA(K) DBETA(K) ERRA ERRB 0 0.5641895835477562869480795D+00 0.8862269254527580136490837D+00 0.1096E-12 0.3180E-12 1 0.9884253928468002854870634D+00 0.1816901138162093284622325D+00 0.1514E-12 0.7741E-13 2 0.1285967619363939960282789D+01 0.3413251289594391985641718D+00 0.1623E-12 0.4367E-13 3 0.1524720844080115303513002D+01 0.5049621529880016319357512D+00 0.1719E-12 0.3890E-13 4 0.1730192274309439256771561D+01 0.6702641946396190856785084D+00 0.1019E-12 0.1769E-12 5 0.1913499843143102570718674D+01 0.8361704992803110155488235D+00 0.2018E-12 0.1991E-12 6 0.2080620336400833224817622D+01 0.1002347851011010842224538D+01 0.1328E-12 0.5801E-13 7 0.2235228380504639149658317D+01 0.1168671164744272743814785D+01 0.5775E-12 0.2474E-12 8 0.2379782443504637420940535D+01 0.1335082922242335357979878D+01 0.7880E-12 0.2131E-12 9 0.2516025643443866409763418D+01 0.1501552599344761843895291D+01 0.8252E-12 0.1889E-12 10 0.2645247925056953180326172D+01 0.1668062362188116168845481D+01 0.1038E-11 0.9833E-13 11 0.2768435953504255906913274D+01 0.1834601052793767641991360D+01 0.9430E-12 0.1796E-13 12 0.2886364594032694569270867D+01 0.2001161318551213784331710D+01 0.7961E-12 0.2032E-13 13 0.2999655653353603538690627D+01 0.2167738111763264485348196D+01 0.7614E-12 0.3652E-13 14 0.3108817175924920151692696D+01 0.2334327849540501398018482D+01 0.4506E-12 0.1710E-12 15 0.3214270636071128227448914D+01 0.2500927917133702669954321D+01 0.2402E-13 0.8186E-13 16 0.3316370297083087365920816D+01 0.2667536360957202088281074D+01 0.1228E-12 0.2062E-13 17 0.3415417332413338944536869D+01 0.2834151691667832757920496D+01 0.1575E-12 0.2978E-12 18 0.3511670344615629515405105D+01 0.3000772753782719027585036D+01 0.4435E-12 0.2120E-13 19 0.3605353345905566430295482D+01 0.3167398636964426811757567D+01 0.5272E-12 0.1193E-12 20 0.3696661911504590799968594D+01 0.3334028614203110245251329D+01 0.3039E-12 0.9500E-13 21 0.3785767992700224948494605D+01 0.3500662097828114651724216D+01 0.2503E-12 0.2917E-13 22 0.3872823730185221489539236D+01 0.3667298607618394889364017D+01 0.1971E-12 0.1016E-12 23 0.3957964510422999291702203D+01 0.3833937747295831850614677D+01 0.1766E-12 0.6671E-14 24 0.4041311441034391638446867D+01 0.4000579186936195680581479D+01 0.1978E-12 0.2912E-13 25 0.4122973374779628183603027D+01 0.4167222649628333194557220D+01 0.1643E-12 0.5689E-13 26 0.4203048578872001952660277D+01 0.4333867901229950443604430D+01 0.1415E-12 0.7878E-13 27 0.4281626122768203585210086D+01 0.4500514742412094337351180D+01 0.1298E-12 0.5703E-13 28 0.4358787040389888852503068D+01 0.4667163002416825703159569D+01 0.3492E-13 0.1223E-12 29 0.4434605310041297172735927D+01 0.4833812534112327742026727D+01 0.1230E-12 0.2314E-13 30 0.4509148685807793333274300D+01 0.5000463210041202834966111D+01 0.3453E-12 0.1646E-12 31 0.4582479407059626769460533D+01 0.5167114919236647446410207D+01 0.3730E-12 0.5879E-13 32 0.4654654807220995103425025D+01 0.5333767564637804018268582D+01 0.3781E-12 0.1182E-13 33 0.4725727838755017221054502D+01 0.5500421060976676891721065D+01 0.4114E-12 0.2652E-14 34 0.4795747528043545327295809D+01 0.5667075333039157064295568D+01 0.3771E-12 0.6635E-13 35 0.4864759371276861258445861D+01 0.5833730314225067360232878D+01 0.4178E-12 0.4674E-13 36 0.4932805680443494860289873D+01 0.6000385945348890195707763D+01 0.4607E-12 0.1276E-13 37 0.4999925886899688131436246D+01 0.6167042173635499472318163D+01 0.4887E-12 0.1507E-12 38 0.5066156808707957816332691D+01 0.6333698951874867575482285D+01 0.5584E-12 0.6020E-13 39 0.5131532886894296519319692D+01 0.6500356237707132938035155D+01 0.6712E-12 0.1820E-13 C-END-OF-FILE cat < test8.f c c program test8 c c external qcheb dimension oom2(7),xp(1),yp(1),endl(1),endr(1),xfer(1),wfer(1), *a(79),b(79),fnu(80),alpha(40),beta(40),be(40),x(500),w(500), *xm(500),wm(500),s(40),s0(80),s1(80),s2(80) logical finl,finr common/s/om2 data oom2/.1,.3,.5,.7,.9,.99,.999/ c c This test reproduces the results of test1 in single precision, c for n=40, using the routine mccheb in place of cheb and c Gauss-Chebyshev quadrature to discretize the modified moments. c write(*,1) 1 format(/) epsma=r1mach(3) c c epsma is the machine single precision. c iq=1 idelta=1 n=40 ndm1=2*n-1 mc=1 mp=0 ncapm=500 eps=100.*epsma c c Generate the recurrence coefficients for the (Chebyshev) polynomials c defining the modified moments. c call recur(ndm1,3,0.,0.,a,b,ierr) c c Compute the desired recursion coefficients by the discretized c Chebyshev algorithm. c do 20 iom=1,7 om2=oom2(iom) call mccheb(n,ncapm,mc,mp,xp,yp,qcheb,eps,iq,idelta,finl,finr, * endl,endr,xfer,wfer,a,b,fnu,alpha,beta,ncap,kount,ierr,be,x, * w,xm,wm,s,s0,s1,s2) c c On machines with limited single-precision exponent range, the routine c cheb may have generated an underflow exception, which however is c harmless and can be ignored. c write(*,2) ncap,kount,ierr 2 format(/'ncap=',i3,' kount=',i3,' ierr=',i3/) c c Print the results. c write(*,3) 3 format(5x,'k',6x,'beta(k)'/) do 10 k=1,n km1=k-1 if(k.eq.1) then write(*,4) km1,beta(k),om2 4 format(1x,i5,e18.10,' om2 =',f6.3) else write(*,5) km1,beta(k) 5 format(1x,i5,e18.10) end if 10 continue write(*,1) 20 continue stop end subroutine qcheb(n,x,w,i,ierr) dimension x(n),w(n) common/s/om2 fn=real(n) pi=4.*atan(1.) do 10 k=1,n fk=real(k) x(k)=cos((2.*fk-1.)*pi/(2.*fn)) w(k)=pi/(fn*sqrt(1.-om2*x(k)**2)) 10 continue return end function wf(x,i) c c This is a dummy function. It is never called, since the routine c qgp in mccheb which requires wf is not activated in this test. c wf=0. return end C-END-OF-FILE cat < test8.out output of test8: NCAP= 81 KOUNT= 1 IERR= 0 K BETA(K) 0 0.3224882697E+01 OM2 = 0.100 1 0.5065840806E+00 2 0.2467293493E+00 3 0.2499786103E+00 4 0.2499997193E+00 5 0.2499999954E+00 6 0.2499999999E+00 7 0.2500000000E+00 8 0.2500000000E+00 9 0.2500000000E+00 10 0.2500000000E+00 11 0.2500000000E+00 12 0.2500000000E+00 13 0.2500000000E+00 14 0.2500000000E+00 15 0.2500000000E+00 16 0.2500000000E+00 17 0.2500000000E+00 18 0.2500000000E+00 19 0.2500000000E+00 20 0.2500000000E+00 21 0.2500000000E+00 22 0.2500000000E+00 23 0.2500000000E+00 24 0.2500000000E+00 25 0.2500000000E+00 26 0.2500000000E+00 27 0.2500000000E+00 28 0.2500000000E+00 29 0.2500000000E+00 30 0.2500000000E+00 31 0.2500000000E+00 32 0.2500000000E+00 33 0.2500000000E+00 34 0.2500000000E+00 35 0.2500000000E+00 36 0.2500000000E+00 37 0.2500000000E+00 38 0.2500000000E+00 39 0.2500000000E+00 NCAP= 81 KOUNT= 1 IERR= 0 K BETA(K) 0 0.3427778896E+01 OM2 = 0.300 1 0.5222553572E+00 2 0.2391089484E+00 3 0.2497633566E+00 4 0.2499895949E+00 5 0.2499994256E+00 6 0.2499999644E+00 7 0.2499999976E+00 8 0.2499999998E+00 9 0.2500000000E+00 10 0.2500000000E+00 11 0.2500000000E+00 12 0.2500000000E+00 13 0.2500000000E+00 14 0.2500000000E+00 15 0.2500000000E+00 16 0.2500000000E+00 17 0.2500000000E+00 18 0.2500000000E+00 19 0.2500000000E+00 20 0.2500000000E+00 21 0.2500000000E+00 22 0.2500000000E+00 23 0.2500000000E+00 24 0.2500000000E+00 25 0.2500000000E+00 26 0.2500000000E+00 27 0.2500000000E+00 28 0.2500000000E+00 29 0.2500000000E+00 30 0.2500000000E+00 31 0.2500000000E+00 32 0.2500000000E+00 33 0.2500000000E+00 34 0.2500000000E+00 35 0.2500000000E+00 36 0.2500000000E+00 37 0.2500000000E+00 38 0.2500000000E+00 39 0.2500000000E+00 NCAP= 81 KOUNT= 1 IERR= 0 K BETA(K) 0 0.3708149355E+01 OM2 = 0.500 1 0.5430534190E+00 2 0.2293202677E+00 3 0.2491525791E+00 4 0.2499288948E+00 5 0.2499924766E+00 6 0.2499991046E+00 7 0.2499998855E+00 8 0.2499999846E+00 9 0.2499999979E+00 10 0.2499999997E+00 11 0.2500000000E+00 12 0.2500000000E+00 13 0.2500000000E+00 14 0.2500000000E+00 15 0.2500000000E+00 16 0.2500000000E+00 17 0.2500000000E+00 18 0.2500000000E+00 19 0.2500000000E+00 20 0.2500000000E+00 21 0.2500000000E+00 22 0.2500000000E+00 23 0.2500000000E+00 24 0.2500000000E+00 25 0.2500000000E+00 26 0.2500000000E+00 27 0.2500000000E+00 28 0.2500000000E+00 29 0.2500000000E+00 30 0.2500000000E+00 31 0.2500000000E+00 32 0.2500000000E+00 33 0.2500000000E+00 34 0.2500000000E+00 35 0.2500000000E+00 36 0.2500000000E+00 37 0.2500000000E+00 38 0.2500000000E+00 39 0.2500000000E+00 NCAP= 81 KOUNT= 1 IERR= 0 K BETA(K) 0 0.4150726271E+01 OM2 = 0.700 1 0.5738703563E+00 2 0.2153897141E+00 3 0.2476685096E+00 4 0.2496725303E+00 5 0.2499416058E+00 6 0.2499882474E+00 7 0.2499974543E+00 8 0.2499994207E+00 9 0.2499998634E+00 10 0.2499999669E+00 11 0.2499999918E+00 12 0.2499999979E+00 13 0.2499999995E+00 14 0.2499999999E+00 15 0.2500000000E+00 16 0.2500000000E+00 17 0.2500000000E+00 18 0.2500000000E+00 19 0.2500000000E+00 20 0.2500000000E+00 21 0.2500000000E+00 22 0.2500000000E+00 23 0.2500000000E+00 24 0.2500000000E+00 25 0.2500000000E+00 26 0.2500000000E+00 27 0.2500000000E+00 28 0.2500000000E+00 29 0.2500000000E+00 30 0.2500000000E+00 31 0.2500000000E+00 32 0.2500000000E+00 33 0.2500000000E+00 34 0.2500000000E+00 35 0.2500000000E+00 36 0.2500000000E+00 37 0.2500000000E+00 38 0.2500000000E+00 39 0.2500000000E+00 NCAP= 81 KOUNT= 1 IERR= 0 K BETA(K) 0 0.5156184227E+01 OM2 = 0.900 1 0.6349731661E+00 2 0.1891491670E+00 3 0.2432300687E+00 4 0.2483762717E+00 5 0.2494981461E+00 6 0.2498235644E+00 7 0.2499329382E+00 8 0.2499731425E+00 9 0.2499888335E+00 10 0.2499952249E+00 11 0.2499979129E+00 12 0.2499990716E+00 13 0.2499995811E+00 14 0.2499998087E+00 15 0.2499999118E+00 16 0.2499999590E+00 17 0.2499999808E+00 18 0.2499999909E+00 19 0.2499999957E+00 20 0.2499999979E+00 21 0.2499999990E+00 22 0.2499999995E+00 23 0.2499999998E+00 24 0.2499999999E+00 25 0.2499999999E+00 26 0.2500000000E+00 27 0.2500000000E+00 28 0.2500000000E+00 29 0.2500000000E+00 30 0.2500000000E+00 31 0.2500000000E+00 32 0.2500000000E+00 33 0.2500000000E+00 34 0.2500000000E+00 35 0.2500000000E+00 36 0.2500000000E+00 37 0.2500000000E+00 38 0.2500000000E+00 39 0.2500000000E+00 NCAP=201 KOUNT= 4 IERR= 0 K BETA(K) 0 0.7391274726E+01 OM2 = 0.990 1 0.7324070685E+00 2 0.1479427850E+00 3 0.2338554949E+00 4 0.2443419681E+00 5 0.2473968641E+00 6 0.2486202549E+00 7 0.2492022455E+00 8 0.2495108349E+00 9 0.2496871093E+00 10 0.2497933989E+00 11 0.2498601662E+00 12 0.2499034676E+00 13 0.2499322764E+00 14 0.2499518463E+00 15 0.2499653717E+00 16 0.2499748563E+00 17 0.2499815901E+00 18 0.2499864219E+00 19 0.2499899213E+00 20 0.2499924763E+00 21 0.2499943550E+00 22 0.2499957454E+00 23 0.2499967801E+00 24 0.2499975541E+00 25 0.2499981358E+00 26 0.2499985747E+00 27 0.2499989072E+00 28 0.2499991599E+00 29 0.2499993526E+00 30 0.2499995000E+00 31 0.2499996131E+00 32 0.2499997000E+00 33 0.2499997669E+00 34 0.2499998186E+00 35 0.2499998586E+00 36 0.2499998897E+00 37 0.2499999138E+00 38 0.2499999325E+00 39 0.2499999471E+00 NCAP=521 KOUNT= 8 IERR=500 K BETA(K) 0 0.9682265121E+01 OM2 = 0.999 1 0.7937821421E+00 2 0.1198676725E+00 3 0.2270401184E+00 4 0.2410608787E+00 5 0.2454285325E+00 6 0.2473016530E+00 7 0.2482587060E+00 8 0.2488056563E+00 9 0.2491436516E+00 10 0.2493649426E+00 11 0.2495164123E+00 12 0.2496238132E+00 13 0.2497021808E+00 14 0.2497607367E+00 15 0.2498053716E+00 16 0.2498399786E+00 17 0.2498672068E+00 18 0.2498889045E+00 19 0.2499063894E+00 20 0.2499206196E+00 21 0.2499323032E+00 22 0.2499419716E+00 23 0.2499500293E+00 24 0.2499567876E+00 25 0.2499624891E+00 26 0.2499673246E+00 27 0.2499714454E+00 28 0.2499749728E+00 29 0.2499780046E+00 30 0.2499806203E+00 31 0.2499828848E+00 32 0.2499848516E+00 33 0.2499865651E+00 34 0.2499880620E+00 35 0.2499893732E+00 36 0.2499905245E+00 37 0.2499915377E+00 38 0.2499924313E+00 39 0.2499932210E+00 C-END-OF-FILE cat < test9.f c c program test9 c c dimension a(199),b(199),fnu(200),alpha(100),beta(100),s(100), *s0(200),s1(200),s2(200),alphc(100),betc(100) double precision dsigma,da(199),db(199),dnu(200),dalpha(100), *dbeta(100),ds(100),ds0(200),ds1(200),ds2(200),dalphc(100), *dbetc(100) c c This test recomputes the results of test2 for sigma=.5 by applying c the routine chri with iopt=1, x=0 to the weight function with c parameter sigma=-.5. Printed are the relative discrepancies in both c single and double precision between these results and those obtained c in test 2 by the modified Chebyshev algorithm. The test is embedded c in the routine test2, from which all print statements have been c removed. c logical modmom,intexp modmom=.true. c c Generate the recursion coefficients for the polynomials defining the c modified resp. ordinary moments. c if(modmom) then n=100 ndm1=2*n-1 call recur(ndm1,2,0.,0.,a,b,ierr) call drecur(ndm1,2,0.d0,0.d0,da,db,iderr) else n=12 ndm1=2*n-1 do 10 k=1,ndm1 a(k)=0. b(k)=0. da(k)=0.d0 db(k)=0.d0 10 continue end if do 30 is=1,3 dsigma=-.5d0+.5d0*dble(is-1) sigma=sngl(dsigma) if(is.eq.2) then intexp=.true. else intexp=.false. end if c c Compute the modified resp. ordinary moments using Eqs. (3.12) and c (3.11) of the companion paper. On machines with limited exponent c range, some of the high-order modified moments may underflow, without c this having any deteriorating effect on the accuracy. c call fmm(n,modmom,intexp,sigma,fnu) call dmm(n,modmom,intexp,dsigma,dnu) c c Compute the desired recursion coefficients by means of the modified c Chebyshev algorithm; for the latter, see, e.g., Section 2.4 of c W. Gautschi, ``On generating orthogonal polynomials'', SIAM J. Sci. c Statist. Comput. 3, 1982, 289-317. c call cheb(n,a,b,fnu,alpha,beta,s,ierr,s0,s1,s2) c c On machines with limited single-precision exponent range, the routine c cheb may generate an underflow exception, which however is harmless c and can be ignored. c call dcheb(n,da,db,dnu,dalpha,dbeta,ds,iderr,ds0,ds1,ds2) c c Up to this point the code is identical with the one of test2. c if(is.eq.1) then write(*,1) ierr,iderr 1 format(/1x,'ierr in cheb = ',i4,' iderr in dcheb = ',i4/) if(ierr.ne.0) then nc=abs(ierr) else nc=n end if if(iderr.ne.0) then ncd=abs(iderr) else ncd=n end if c c Compute the desired recursion coefficients by a modification c algorithm. c nm1=nc-1 call chri(nm1,1,alpha,beta,0.,0.,0.,0.,alphc,betc,ierr) nm1=ncd-1 call dchri(nm1,1,dalpha,dbeta,0.d0,0.d0,0.d0,0.d0,dalphc, * dbetc,iderr) end if if(is.eq.3) then write(*,2) 2 format(/1x,'test of the results for sigma=1/2'/) np=nc if(ncd.lt.nc) np=ncd nm1=np-1 c c Compute and print the relative discrepancies between the results of c the modified Chebyshev algorithm and the modification algorithm. c write(*,3) 3 format(3x,'k',2x,'err alpha',4x,'err beta',12x,'err dalpha', * 2x,'err dbeta'/) do 15 k=1,nm1 km1=k-1 errac=abs(alpha(k)-alphc(k))/alpha(k) errbc=abs(beta(k)-betc(k))/beta(k) errdac=sngl(dabs(dalpha(k)-dalphc(k))/dalpha(k)) errdbc=sngl(dabs(dbeta(k)-dbetc(k))/dbetc(k)) write(*,4) km1,errac,errbc,errdac,errdbc 4 format(1x,i3,2e12.4,9x,2e12.4) 15 continue write(*,5) 5 format(/1x,'end of test'/) end if c c The rest of the code is essentially the same as the corresponding c piece of code in test2 with all print statements removed. c eamax=0. ebmax=0. do 20 k=1,n km1=k-1 erra=sngl(dabs(dble(alpha(k))-dalpha(k))/dalpha(k)) errb=sngl(dabs(dble(beta(k))-dbeta(k))/dbeta(k)) if(erra.gt.eamax) then eamax=erra kamax=km1 end if if(errb.gt.ebmax) then ebmax=errb kbmax=km1 end if 20 continue 30 continue stop end subroutine fmm(n,modmom,intexp,sigma,fnu) c c This generates the first 2*n modified moments (if modmom=.true.) c relative to shifted monic Legendre polynomials, using Eq. (3.12) of c the companion paper, and the first 2*n ordinary moments (if modmom c =.false.) by Eq. (3.11), of the weight function c c (x**sigma)*ln(1/x) on (0,1], sigma > -1, c c for sigma an integer (if intexp=.true.) or a real number (if intexp c =.false.). In either case, the input variable sigma is of type real. c dimension fnu(*) logical modmom,intexp c c The array fnu is assumed to have dimension 2*n. c nd=2*n sigp1=sigma+1. if(modmom) then isigma=int(sigma) isigp1=isigma+1 isigp2=isigma+2 isigp3=isigma+3 if(intexp .and. isigp1.lt.nd) then kmax=isigp1 else kmax=nd end if c=1. do 20 k=1,kmax km1=k-1 fk=real(k) p=1. s=1./sigp1 if(kmax.gt.1) then do 10 i=1,km1 fi=real(i) p=(sigp1-fi)*p/(sigp1+fi) s=s+1./(sigp1+fi)-1./(sigp1-fi) 10 continue end if fnu(k)=c*s*p/sigp1 c=fk*c/(4.*fk-2.) 20 continue if(.not.intexp .or. isigp1.ge.nd) return q=-.5 if(isigma.gt.0) then do 30 iq=1,isigma fiq=real(iq) q=fiq*fiq*q/((2.*fiq+1.)*(2.*fiq+2.)) 30 continue end if fnu(isigp2)=c*q if(isigp2.eq.nd) return do 40 k=isigp3,nd km1=k-1 fkm1=real(km1) fnu(k)=-fkm1*(fkm1-sigp1)*fnu(km1)/((4.*fkm1-2.)* * (fkm1+sigp1)) 40 continue return else do 50 k=1,nd fkm1=real(k-1) fnu(k)=(1./(sigp1+fkm1))**2 50 continue end if end subroutine dmm(n,modmom,intexp,dsigma,dnu) c c This is a double-precision version of the routine fmm. c double precision dsigma,dnu(*),dsigp1,dc,dk,dp,ds,di,dq,diq,dkm1 logical modmom,intexp c c The array dnu is assumed to have dimension 2*n. c nd=2*n dsigp1=dsigma+1.d0 if(modmom) then isigma=idint(dsigma) isigp1=isigma+1 isigp2=isigma+2 isigp3=isigma+3 if(intexp .and. isigp1.lt.nd) then kmax=isigp1 else kmax=nd end if dc=1.d0 do 20 k=1,kmax km1=k-1 dk=dble(k) dp=1.d0 ds=1.d0/dsigp1 if(kmax.gt.1) then do 10 i=1,km1 di=dble(i) dp=(dsigp1-di)*dp/(dsigp1+di) ds=ds+1.d0/(dsigp1+di)-1.d0/(dsigp1-di) 10 continue end if dnu(k)=dc*ds*dp/dsigp1 dc=dk*dc/(4.d0*dk-2.d0) 20 continue if(.not.intexp .or. isigp1.ge.nd) return dq=-.5d0 if(isigma.gt.0) then do 30 iq=1,isigma diq=dble(iq) dq=diq*diq*dq/((2.d0*diq+1.d0)*(2.d0*diq+2.d0)) 30 continue end if dnu(isigp2)=dc*dq if(isigp2.eq.nd) return do 40 k=isigp3,nd km1=k-1 dkm1=dble(km1) dnu(k)=-dkm1*(dkm1-dsigp1)*dnu(km1)/((4.d0*dkm1-2.d0)* * (dkm1+dsigp1)) 40 continue return else do 50 k=1,nd dkm1=dble(k-1) dnu(k)=(1.d0/(dsigp1+dkm1))**2 50 continue end if end C-END-OF-FILE cat < test9.out output of test9 with modmom=.true.: IERR IN CHEB = 0 IDERR IN DCHEB = 0 TEST OF THE RESULTS FOR SIGMA=1/2 K ERR ALPHA ERR BETA ERR DALPHA ERR DBETA 0 0.7895E-13 0.4796E-13 0.2805E-27 0.7952E-27 1 0.2936E-12 0.2628E-12 0.2942E-26 0.2334E-26 2 0.5170E-12 0.7845E-12 0.7709E-26 0.8813E-26 3 0.7706E-12 0.1312E-11 0.1540E-25 0.2082E-25 4 0.8887E-12 0.1617E-11 0.2505E-25 0.4246E-25 5 0.1094E-11 0.1917E-11 0.3220E-25 0.5571E-25 6 0.1327E-11 0.2391E-11 0.4087E-25 0.7345E-25 7 0.1690E-11 0.2987E-11 0.4797E-25 0.8951E-25 8 0.2002E-11 0.3676E-11 0.5467E-25 0.1018E-24 9 0.2321E-11 0.4271E-11 0.6365E-25 0.1174E-24 10 0.2683E-11 0.5003E-11 0.7308E-25 0.1366E-24 11 0.2946E-11 0.5613E-11 0.8257E-25 0.1553E-24 12 0.3280E-11 0.6195E-11 0.8958E-25 0.1731E-24 13 0.3564E-11 0.6833E-11 0.9593E-25 0.1844E-24 14 0.3841E-11 0.7294E-11 0.1031E-24 0.1980E-24 15 0.4174E-11 0.7983E-11 0.1139E-24 0.2163E-24 16 0.4572E-11 0.8736E-11 0.1231E-24 0.2379E-24 17 0.4913E-11 0.9439E-11 0.1298E-24 0.2528E-24 18 0.5290E-11 0.1017E-10 0.1372E-24 0.2665E-24 19 0.5630E-11 0.1086E-10 0.1448E-24 0.2813E-24 20 0.5950E-11 0.1153E-10 0.1552E-24 0.2989E-24 21 0.6412E-11 0.1231E-10 0.1656E-24 0.3202E-24 22 0.6795E-11 0.1319E-10 0.1792E-24 0.3442E-24 23 0.7172E-11 0.1393E-10 0.1926E-24 0.3720E-24 24 0.7648E-11 0.1478E-10 0.2065E-24 0.3985E-24 25 0.7968E-11 0.1556E-10 0.2215E-24 0.4279E-24 26 0.8486E-11 0.1638E-10 0.2368E-24 0.4577E-24 27 0.8941E-11 0.1741E-10 0.2510E-24 0.4877E-24 28 0.9460E-11 0.1836E-10 0.2659E-24 0.5158E-24 29 0.1001E-10 0.1948E-10 0.2821E-24 0.5481E-24 30 0.1053E-10 0.2048E-10 0.2990E-24 0.5803E-24 31 0.1111E-10 0.2161E-10 0.3172E-24 0.6168E-24 32 0.1156E-10 0.2265E-10 0.3339E-24 0.6506E-24 33 0.1195E-10 0.2345E-10 0.3483E-24 0.6832E-24 34 0.1249E-10 0.2437E-10 0.3614E-24 0.7090E-24 35 0.1296E-10 0.2543E-10 0.3778E-24 0.7386E-24 36 0.1345E-10 0.2642E-10 0.3926E-24 0.7703E-24 37 0.1391E-10 0.2736E-10 0.4089E-24 0.8002E-24 38 0.1444E-10 0.2829E-10 0.4241E-24 0.8336E-24 39 0.1499E-10 0.2937E-10 0.4391E-24 0.8623E-24 40 0.1561E-10 0.3060E-10 0.4540E-24 0.8928E-24 41 0.1625E-10 0.3179E-10 0.4692E-24 0.9217E-24 42 0.1690E-10 0.3312E-10 0.4853E-24 0.9548E-24 43 0.1754E-10 0.3442E-10 0.4994E-24 0.9855E-24 44 0.1824E-10 0.3576E-10 0.5126E-24 0.1011E-23 45 0.1889E-10 0.3713E-10 0.5249E-24 0.1038E-23 46 0.1948E-10 0.3833E-10 0.5382E-24 0.1062E-23 47 0.2012E-10 0.3954E-10 0.5531E-24 0.1091E-23 48 0.2076E-10 0.4088E-10 0.5683E-24 0.1121E-23 49 0.2128E-10 0.4201E-10 0.5840E-24 0.1152E-23 50 0.2184E-10 0.4309E-10 0.5977E-24 0.1181E-23 51 0.2246E-10 0.4425E-10 0.6117E-24 0.1209E-23 52 0.2307E-10 0.4554E-10 0.6271E-24 0.1238E-23 53 0.2361E-10 0.4663E-10 0.6424E-24 0.1269E-23 54 0.2425E-10 0.4782E-10 0.6561E-24 0.1299E-23 55 0.2499E-10 0.4917E-10 0.6698E-24 0.1325E-23 56 0.2576E-10 0.5072E-10 0.6861E-24 0.1355E-23 57 0.2655E-10 0.5225E-10 0.7030E-24 0.1389E-23 58 0.2733E-10 0.5386E-10 0.7188E-24 0.1422E-23 59 0.2804E-10 0.5536E-10 0.7362E-24 0.1454E-23 60 0.2881E-10 0.5680E-10 0.7538E-24 0.1489E-23 61 0.2972E-10 0.5852E-10 0.7706E-24 0.1524E-23 62 0.3047E-10 0.6017E-10 0.7896E-24 0.1560E-23 63 0.3129E-10 0.6172E-10 0.8090E-24 0.1599E-23 64 0.3213E-10 0.6343E-10 0.8275E-24 0.1636E-23 65 0.3297E-10 0.6508E-10 0.8468E-24 0.1674E-23 66 0.3382E-10 0.6673E-10 0.8656E-24 0.1713E-23 67 0.3471E-10 0.6852E-10 0.8840E-24 0.1749E-23 68 0.3551E-10 0.7016E-10 0.9031E-24 0.1786E-23 69 0.3641E-10 0.7188E-10 0.9225E-24 0.1826E-23 70 0.3728E-10 0.7370E-10 0.9401E-24 0.1862E-23 71 0.3799E-10 0.7522E-10 0.9596E-24 0.1899E-23 72 0.3882E-10 0.7675E-10 0.9791E-24 0.1939E-23 73 0.3964E-10 0.7847E-10 0.9965E-24 0.1975E-23 74 0.4042E-10 0.8004E-10 0.1015E-23 0.2011E-23 75 0.4122E-10 0.8161E-10 0.1036E-23 0.2050E-23 76 0.4202E-10 0.8325E-10 0.1057E-23 0.2092E-23 77 0.4278E-10 0.8475E-10 0.1076E-23 0.2133E-23 78 0.4359E-10 0.8633E-10 0.1094E-23 0.2169E-23 79 0.4439E-10 0.8796E-10 0.1113E-23 0.2206E-23 80 0.4524E-10 0.8958E-10 0.1131E-23 0.2243E-23 81 0.4612E-10 0.9132E-10 0.1150E-23 0.2281E-23 82 0.4695E-10 0.9301E-10 0.1169E-23 0.2318E-23 83 0.4785E-10 0.9476E-10 0.1188E-23 0.2356E-23 84 0.4872E-10 0.9657E-10 0.1208E-23 0.2395E-23 85 0.4953E-10 0.9823E-10 0.1229E-23 0.2437E-23 86 0.5042E-10 0.9989E-10 0.1253E-23 0.2482E-23 87 0.5129E-10 0.1016E-09 0.1274E-23 0.2528E-23 88 0.5214E-10 0.1034E-09 0.1295E-23 0.2569E-23 89 0.5298E-10 0.1051E-09 0.1315E-23 0.2611E-23 90 0.5385E-10 0.1068E-09 0.1336E-23 0.2650E-23 91 0.5468E-10 0.1085E-09 0.1357E-23 0.2692E-23 92 0.5547E-10 0.1101E-09 0.1377E-23 0.2732E-23 93 0.5630E-10 0.1118E-09 0.1397E-23 0.2774E-23 94 0.5715E-10 0.1134E-09 0.1418E-23 0.2815E-23 95 0.5804E-10 0.1152E-09 0.1439E-23 0.2855E-23 96 0.5883E-10 0.1169E-09 0.1462E-23 0.2902E-23 97 0.5966E-10 0.1185E-09 0.1483E-23 0.2945E-23 98 0.6042E-10 0.1201E-09 0.1504E-23 0.2987E-23 END OF TEST C-END-OF-FILE cat < test10.f c c program test10 c c dimension a(31),b(31),alpha(31),beta(31),z(11),w(11),e(11), *a1(31),b1(31),betap(20,12),erram(12),errbm(12) double precision depsma,d1mach,da(31),db(31),dalpha(31),dbeta(31), *dz(11),dw(11),de(11),da1(31),db1(31) c c epsma and depsma are the machine single and double precision. c epsma=r1mach(3) depsma=d1mach(3) c c This test applies the routines indp and dindp to generate the c first 20 recursion coefficients of the induced Legendre polynomials c pind(k,m)(.), m=0,1,2,...,11, that is, of the polynomials orthogonal c relative to the weight function c c [p(m)(x)]**2 on [-1,1], c c where p(m)(.) is the (monic) Legendre polynomial of degree m. c (When m=0, then pind(k,0)(.)=p(k)(.).) The routine also prints the c absolute and relative errors, respectively, of the alpha- and beta- c coefficients. c n=20 do 20 im=1,12 m=im-1 npm=n+m c c Generate the Legendre recurrence coefficients required in the c routines indp and dindp. c call recur(npm,1,0.,0.,a,b,ierr) call drecur(npm,1,0.d0,0.d0,da,db,ierr) c c Compute the desired recursion coefficients. c call indp(n,m,a,b,epsma,alpha,beta,ierr,z,w,e,a1,b1) call dindp(n,m,da,db,depsma,dalpha,dbeta,ierr,dz,dw, * de,da1,db1) c c Compute and print the respective errors. c erram(im)=0. errbm(im)=0. do 10 k=1,n erra=sngl(dabs(dble(alpha(k))-dalpha(k))) errb=sngl(dabs((dble(beta(k))-dbeta(k))/dbeta(k))) if(erra.gt.erram(im)) erram(im)=erra if(errb.gt.errbm(im)) errbm(im)=errb betap(k,im)=sngl(dbeta(k)) 10 continue 20 continue do 40 ip=1,3 ip4=1+4*(ip-1) write(*,1) ip4-1,ip4,ip4+1,ip4+2 1 format(5x,'k',2x,'m=',i1,' beta(k)',2x,'m=',i1,' beta(k)',2x, * 'm=',i2,' beta(k)',2x,'m=',i2,' beta(k)'/) do 30 k=1,n km1=k-1 write(*,2) km1,betap(k,ip4),betap(k,ip4+1),betap(k,ip4+2), * betap(k,ip4+3) 2 format(1x,i5,4f14.10) 30 continue write(*,3) erram(ip4),erram(ip4+1),erram(ip4+2),erram(ip4+3) 3 format(/4x,'erra',e12.4,3e14.4) write(*,4) errbm(ip4),errbm(ip4+1),errbm(ip4+2),errbm(ip4+3) 4 format(4x,'errb',e12.4,3e14.4//) 40 continue stop end subroutine indp(n,m,a,b,eps,alpha,beta,ierr,z,w,e,a1,b1) c c If p(m)(.) denotes the (monic) orthogonal polynomial of degree m c relative to the weight function w(x), then the corresponding m-th c induced orthogonal polynomials pind(k,m)(.), k=0,1,2,..., are those c orthogonal with respect to the weight function c c (p(m)(x)**2)*w(x). c c (For background on induced orthogonal polynomials, including an c algorithm for generating their recursion coefficients, see W. Gautschi c and S. Li,``A set of orthogonal polynomials induced by a given c orthogonal polynomial'', Aequationes Math., to appear.) This routine c obtains the first n recurrence coefficients of the m-th induced c orthogonal polynomials by an m-fold application of the routine chri c with iopt=7, the shifts taken being, in succession, the zeros of c p(m)(.). c dimension a(*),b(*),alpha(*),beta(*),z(m),w(m),e(m), *a1(*),b1(*) c c The arrays a,b,alpha,beta,a1,b1 are assumed to have dimension n+m. c npm=n+m do 10 k=1,npm alpha(k)=a(k) beta(k)=b(k) 10 continue if(m.eq.0) return call gauss(m,a,b,eps,z,w,ierr,e) do 30 imu=1,m mi=npm-imu do 20 k=1,mi+1 a1(k)=alpha(k) b1(k)=beta(k) 20 continue x=z(imu) call chri(mi,7,a1,b1,x,0.,0.,0.,alpha,beta,ierrc) 30 continue return end subroutine dindp(n,m,da,db,deps,dalpha,dbeta,ierr,dz,dw,de, *da1,db1) c c This is a double-precision version of the routine indp. c double precision da(*),db(*),deps,dalpha(*),dbeta(*), *dz(m),dw(m),de(m),da1(*),db1(*),dx c c The arrays da,db,dalpha,dbeta,da1,db1 are assumed to have c dimension n+m. c npm=n+m do 10 k=1,npm dalpha(k)=da(k) dbeta(k)=db(k) 10 continue if(m.eq.0) return call dgauss(m,da,db,deps,dz,dw,ierr,de) do 30 imu=1,m mi=npm-imu do 20 k=1,mi+1 da1(k)=dalpha(k) db1(k)=dbeta(k) 20 continue dx=dz(imu) call dchri(mi,7,da1,db1,dx,0.d0,0.d0,0.d0,dalpha, * dbeta,ierrc) 30 continue return end C-END-OF-FILE cat < test10.out output of test10: K M=0 BETA(K) M=1 BETA(K) M= 2 BETA(K) M= 3 BETA(K) 0 2.0000000000 0.6666666667 0.1777777778 0.0457142857 1 0.3333333333 0.6000000000 0.5238095238 0.5111111111 2 0.2666666667 0.1142857143 0.2943722944 0.2596398770 3 0.2571428571 0.3968253968 0.1122994652 0.2940975598 4 0.2539682540 0.1616161616 0.3049499520 0.1117331329 5 0.2525252525 0.3426573427 0.3401083329 0.3018522308 6 0.2517482517 0.1846153846 0.1650550769 0.2620478012 7 0.2512820513 0.3176470588 0.2375564062 0.3332025143 8 0.2509803922 0.1981424149 0.3369733731 0.1650309150 9 0.2507739938 0.3032581454 0.2091606343 0.2504290797 10 0.2506265664 0.2070393375 0.2095634606 0.2324006967 11 0.2505175983 0.2939130435 0.3138134151 0.3361176315 12 0.2504347826 0.2133333333 0.2467060415 0.2111809567 13 0.2503703704 0.2873563218 0.2018701782 0.2421749472 14 0.2503192848 0.2180200222 0.2840270717 0.2095682876 15 0.2502780868 0.2825024438 0.2737336947 0.3119781359 16 0.2502443793 0.2216450216 0.2073733396 0.2443412792 17 0.2502164502 0.2787644788 0.2563508435 0.2546523483 18 0.2501930502 0.2245322245 0.2870839484 0.2016613966 19 0.2501732502 0.2757973734 0.2214990335 0.2802562650 ERRA 0.0000E+00 0.0000E+00 0.1350E-12 0.3126E-12 ERRB 0.1737E-13 0.2687E-13 0.2032E-12 0.3071E-12 K M=4 BETA(K) M=5 BETA(K) M= 6 BETA(K) M= 7 BETA(K) 0 0.0116099773 0.0029318125 0.0007380787 0.0001854659 1 0.5064935065 0.5042735043 0.5030303030 0.5022624434 2 0.2544532391 0.2526272221 0.2517535382 0.2512614153 3 0.2591064074 0.2540898944 0.2523798744 0.2515792646 4 0.2943171019 0.2589409408 0.2539382090 0.2522610729 5 0.1114940608 0.2945728720 0.2588910545 0.2538678613 6 0.3003072324 0.1113707658 0.2947959861 0.2588842880 7 0.2612040942 0.2993872919 0.1112988417 0.2949805303 8 0.2554918286 0.2607481068 0.2987820522 0.1112532109 9 0.3314524838 0.2550761306 0.2604586213 0.2983568381 10 0.1650590884 0.2531916358 0.2548412877 0.2602577001 11 0.2512313029 0.3309444765 0.2529442726 0.2546880250 12 0.2483108832 0.1651390479 0.2521022519 0.2527987891 13 0.2299636175 0.2511610822 0.3308373405 0.2519399389 14 0.3360043367 0.2500050400 0.1652347268 0.2514955605 15 0.2126214215 0.2473365777 0.2509882972 0.3308773577 16 0.2422271180 0.2284895331 0.2503709236 0.1653301351 17 0.2466970015 0.3360523531 0.2494033311 0.2508275199 18 0.2084098535 0.2136949938 0.2467760489 0.2504458176 19 0.3105006867 0.2423054172 0.2274818789 0.2499556974 ERRA 0.1279E-11 0.5187E-12 0.9450E-12 0.2309E-11 ERRB 0.2539E-11 0.6917E-12 0.2055E-11 0.4320E-11 K M=8 BETA(K) M=9 BETA(K) M=10 BETA(K) M=11 BETA(K) 0 0.0000465483 0.0000116731 0.0000029256 0.0000007329 1 0.5017543860 0.5014005602 0.5011441648 0.5009523810 2 0.2509544437 0.2507490633 0.2506044251 0.2504984896 3 0.2511344098 0.2508591460 0.2506757688 0.2505468587 4 0.2514874864 0.2510628095 0.2508024680 0.2506302345 5 0.2521979554 0.2514346952 0.2510192470 0.2507664578 6 0.2538341957 0.2521624725 0.2514025806 0.2509913424 7 0.2588947523 0.2538187608 0.2521419864 0.2513823395 8 0.2951320204 0.2589119534 0.2538129525 0.2521301587 9 0.1112224395 0.2952570509 0.2589313149 0.2538124098 10 0.2980437076 0.1112007021 0.2953612120 0.2589507738 11 0.2601100705 0.2978047542 0.1111847746 0.2954488790 12 0.2545791806 0.2599971739 0.2976172266 0.1111727541 13 0.2527018249 0.2544975296 0.2599082203 0.2974666858 14 0.2518408263 0.2526319525 0.2544338905 0.2598364761 15 0.2513822453 0.2517734496 0.2525788976 0.2543828677 16 0.2511211801 0.2513106438 0.2517242935 0.2525370893 17 0.3309726929 0.2510385242 0.2512610325 0.2516866259 18 0.1654193167 0.2508731207 0.2509846647 0.2512244085 19 0.2506951108 0.3310863832 0.2508107936 0.2509466619 ERRA 0.8953E-12 0.3425E-11 0.2679E-11 0.1357E-11 ERRB 0.1513E-11 0.3091E-11 0.3822E-11 0.3748E-11 C-END-OF-FILE cat < test11.f c c program test11 c c complex rho,rold,z,e dimension xx(5),rr(5),a(500),b(500),alpha(40),beta(40),alphc(40), *betc(40),fnu(80),rho(80),rold(80),s(40),s0(80),s1(80),s2(80), *alphr(40),betr(40),alphcr(40),betcr(40) double precision d1mach,depsma,deps,dal,dbe,dhi,da(800),db(800), *dx,dy,dalpha(40),dbeta(40),dnu(80),drhor(80),drhoi(80), *droldr(80),droldi(80),ds(40),ds0(80),ds1(80),ds2(80),dhr, *dalphc(40),dbetc(40),dalphr(40),dbetr(40),dalcr(40),dbecr(40) data xx/1.001,1.01,1.04,1.07,1.1/ data rr/1.05,1.1625,1.275,1.3875,1.5/ c c This test is to illustrate the dissimilar performance of the routines c chri and gchri in the case of division of the Jacobi weight c function w(t;alj,bej) with parameters alj,bej by either a linear c divisor t-x or a quadratic divisor (t-x)**2 + y**2 . In either c case, the parameters selected are alj=-.8(.4).8, bej=alj(.4).8. In c the former case, x = -1.001, -1.01, -1.04, -1.07 and -1.1, whereas in c the latter case, x and y are chosen to lie, regularly spaced, on c the upper half of an ellipse with foci at +1 and -1 and sum of the c semiaxes equal to rho = 1.05, 1.1625, 1.275, 1.3875 and 1.5. The c routines are run in both single and double precision with n=40, the c results of the latter being used to calculate, and print, the maximum c absolute and relative error of the single-precision alpha- and beta- c coefficients, respectively. Also printed are the starting recurrence c indexes required in the backward recurrence schemes of gchri,dgchri c to achieve single- resp. double-precision accuracy. This information c is contained in the first line of each 3-line block of the output, c where in the case of quadratic divisors only average values (averaged c over the upper half of the respective ellipse) are shown. The second c and third line of each 3-line block display the maximum c ``reconstruction error'', that is, the maximum errors in the alpha's c and beta's if the coefficients produced by gchri,chri and dgchri, c dchri are fed back to the routines chri and dchri with iopt=1 c to recover the original recursion coefficients in single and double c precision. c write(*,1) 1 format(/) epsma=r1mach(3) depsma=d1mach(3) c c epsma and depsma are the machine single and double precision. c n=40 np1=n+1 nm1=n-1 nd=2*n ndm1=nd-1 numax=500 numaxd=800 eps=10.*epsma deps=100.d0*depsma epsd=sngl(deps) ipoly=6 do 70 ial=1,5 al=-.8+.4*real(ial-1) dal=dble(al) ibemax=6-ial do 60 ibe=1,ibemax be=al+.4*real(ibe-1) dbe=dble(be) write(*,2) al,be 2 format(///1x,'al = ',f6.2,' be = ',f6.2//) hi=0. dhi=0.d0 c c Generate the Jacobi recurrence coefficients to be used in the c backward recurrence algorithm of the routines gchri and dgchri. c call recur(numax,ipoly,al,be,a,b,ierr) call drecur(numaxd,ipoly,dal,dbe,da,db,ierrd) write(*,3) 3 format(30x,'gchri',20x,'chri') write(*,4) 4 format(5x,'x',5x,'nu0',2x,'nud0',4x,'erra',8x,'errb',10x, * 'erra',7x,'errb'/) do 20 ix=1,5 x=-xx(ix) dx=dble(x) y=0. dy=0.d0 z=cmplx(x,y) c c Compute the starting index for backward recurrence. c nu0=nu0jac(ndm1,z,eps) nu0d=nu0jac(ndm1,z,epsd) c c Generate the recurrence coefficients for the Jacobi weight function c divided by a linear divisor, using the routines gchri,dgchri. c call gchri(n,1,nu0,numax,eps,a,b,x,y,alpha,beta,nu,ierrg, * ierrc,fnu,rho,rold,s,s0,s1,s2) c c On machines with limited single-precision exponent range, the routine c cheb used in gchri may have generated an underflow exception, c which however is harmless and can be ignored. c call dgchri(n,1,nu0d,numaxd,deps,da,db,dx,dy,dalpha,dbeta, * nud,ierrgd,ierrcd,dnu,drhor,drhoi,droldr,droldi,ds,ds0, * ds1,ds2) if(ierrg.ne.0 .or. ierrc.ne.0 .or. ierrgd.ne.0 .or.ierrcd * .ne.0) then write(*,5) ierrg,ierrgd,al,be,x 5 format(/1x,'ierrg in gchri = ',i4,' ierrg in dgchri = ', * i4,' for al = ',f6.2,' be = ',f6.2,' x = ',f7.4) write(*,6) ierrc,ierrcd,al,be,x 6 format(1x,'ierrc in gchri = ',i4,' ierrc in dgchri = ', * i4,' for al = ',f6.2,' be = ',f6.2,' x = ',f7.4/) goto 20 end if c c Generate the recurrence coefficients for the Jacobi weight function c divided by a linear divisor, using the routines chri,dchri. c hr=real(rho(1)) dhr=drhor(1) call chri(n,4,a,b,x,y,hr,hi,alphc,betc,ierr) call dchri(n,4,da,db,dx,dy,dhr,dhi,dalphc,dbetc,ierr) c c Do the reconstruction. c call chri(nm1,1,alpha,beta,x,y,0.,0.,alphr,betr,ierr) call dchri(nm1,1,dalpha,dbeta,dx,dy,0.d0,0.d0,dalphr,dbetr, * ierr) call chri(nm1,1,alphc,betc,x,y,0.,0.,alphcr,betcr,ierr) call dchri(nm1,1,dalphc,dbetc,dx,dy,0.d0,0.d0,dalcr,dbecr, * ierr) c c Compute and print the maximum errors. c erragm=0. errbgm=0. erracm=0. errbcm=0. erram=0. errbm=0. errdam=0. errdbm=0. eracrm=0. erbcrm=0. edacrm=0. edbcrm=0. do 10 k=1,n km1=k-1 errag=abs(sngl(dble(alpha(k))-dalpha(k))) errbg=abs(sngl((dble(beta(k))-dbeta(k))/dbeta(k))) errac=abs(sngl(dble(alphc(k))-dalphc(k))) errbc=abs(sngl((dble(betc(k))-dbetc(k))/dbetc(k))) if(k.lt.n) then erra=abs(alphr(k)-a(k)) errb=abs((betr(k)-b(k))/b(k)) errda=abs(sngl(dalphr(k)-da(k))) errdb=abs(sngl((dbetr(k)-db(k))/db(k))) eracr=abs(alphcr(k)-a(k)) erbcr=abs((betcr(k)-b(k))/b(k)) edacr=abs(sngl(dalcr(k)-da(k))) edbcr=abs(sngl((dbecr(k)-db(k))/db(k))) if(erra.gt.erram) erram=erra if(errb.gt.errbm) errbm=errb if(errda.gt.errdam) errdam=errda if(errdb.gt.errdbm) errdbm=errdb if(eracr.gt.eracrm) eracrm=eracr if(erbcr.gt.erbcrm) erbcrm=erbcr if(edacr.gt.edacrm) edacrm=edacr if(edbcr.gt.edbcrm) edbcrm=edbcr end if if(errag.gt.erragm) erragm=errag if(errbg.gt.errbgm) errbgm=errbg if(errac.gt.erracm) erracm=errac if(errbc.gt.errbcm) errbcm=errbc 10 continue write(*,7) x,nu0,nu0d,erragm,errbgm,erracm,errbcm 7 format(/1x,f7.4,2i6,2e12.4,2x,2e12.4) if(ix.eq.1) then write(*,8) erram,errbm,errdam,errdbm 8 format(11x,'reconstr.',2e12.4,2x,2e12.4) write(*,9) eracrm,erbcrm,edacrm,edbcrm 9 format(12x,'errors',2x,2e12.4,2x,2e12.4) else write(*,11) erram,errbm,errdam,errdbm 11 format(20x,2e12.4,2x,2e12.4) write(*,11) eracrm,erbcrm,edacrm,edbcrm end if 20 continue write(*,1) ndiv=20 ndivm1=ndiv-1 fndiv=real(ndiv) fndm1=real(ndivm1) pi=4.*atan(1.) write(*,3) write(*,12) 12 format(4x,'rho',4x,'nu0',2x,'nud0',4x,'erra',8x,'errb',10x, * 'erra',7x,'errb'/) do 50 ir=1,5 r=rr(ir) agmv=0. bgmv=0. acmv=0. bcmv=0. amv=0. bmv=0. damv=0. dbmv=0. acrmv=0. bcrmv=0. dacrmv=0. dbcrmv=0. nu0v=0 nu0dv=0 do 40 ith=1,ndivm1 c c Generate the points on the ellipse. c theta=pi*real(ith)/fndiv e=cmplx(cos(theta),sin(theta)) z=.5*(r*e+1./(r*e)) x=real(z) y=aimag(z) dx=dble(x) dy=dble(y) c c Compute the starting index for backward recurrence. c nu0=nu0jac(ndm1,z,eps) nu0d=nu0jac(ndm1,z,epsd) c c Generate the recurrence coefficients for the Jacobi weight function c divided by a quadratic divisor, using the routines gchri,dgchri. c call gchri(n,2,nu0,numax,eps,a,b,x,y,alpha,beta,nu,ierrg, * ierrc,fnu,rho,rold,s,s0,s1,s2) call dgchri(n,2,nu0d,numaxd,deps,da,db,dx,dy,dalpha,dbeta, * nud,ierrgd,ierrcd,dnu,drhor,drhoi,droldr,droldi,ds,ds0, * ds1,ds2) if(ierrg.ne.0 .or.ierrc.ne.0 .or. ierrgd.ne.0 .or. ierrcd * .ne.0) then write(*,5) ierrg,ierrgd,al,be,x write(*,6) ierrc,ierrcd,al,be,x goto 40 end if nu0v=nu0v+nu0 nu0dv=nu0dv+nu0d c c Generate the recurrence coefficients for the Jacobi weight function c divided by a quadratic divisor, using the routines chri,dchri. c hr=real(rho(1)) hi=aimag(rho(1)) dhr=drhor(1) dhi=drhoi(1) call chri(n,5,a,b,x,y,hr,hi,alphc,betc,ierr) call dchri(n,5,da,db,dx,dy,dhr,dhi,dalphc,dbetc,ierr) c c Do the reconstruction. c call chri(nm1,2,alpha,beta,x,y,0.,0.,alphr,betr,ierr) call dchri(nm1,2,dalpha,dbeta,dx,dy,0.d0,0.d0,dalphr, * dbetr,ierr) call chri(nm1,2,alphc,betc,x,y,0.,0.,alphcr,betcr,ierr) call dchri(nm1,2,dalphc,dbetc,dx,dy,0.d0,0.d0,dalcr, * dbecr,ierr) c c Compute and print the maximum average errors. c erragm=0. errbgm=0. erracm=0. errbcm=0. erram=0. errbm=0. errdam=0. errdbm=0. eracrm=0. erbcrm=0. edacrm=0. edbcrm=0. do 30 k=1,n km1=k-1 errag=abs(sngl(dble(alpha(k))-dalpha(k))) errbg=abs(sngl((dble(beta(k))-dbeta(k))/dbeta(k))) errac=abs(sngl(dble(alphc(k))-dalphc(k))) errbc=abs(sngl((dble(betc(k))-dbetc(k))/dbetc(k))) if(k.lt.n) then erra=abs(alphr(k)-a(k)) errb=abs((betr(k)-b(k))/b(k)) errda=abs(sngl(dalphr(k)-da(k))) errdb=abs(sngl((dbetr(k)-db(k))/db(k))) eracr=abs(alphcr(k)-a(k)) erbcr=abs((betcr(k)-b(k))/b(k)) edacr=abs(sngl(dalcr(k)-da(k))) edbcr=abs(sngl((dbecr(k)-db(k))/db(k))) if(erra.gt.erram) erram=erra if(errb.gt.errbm) errbm=errb if(errda.gt.errdam) errdam=errda if(errdb.gt.errdbm) errdbm=errdb if(eracr.gt.eracrm) eracrm=eracr if(erbcr.gt.erbcrm) erbcrm=erbcr if(edacr.gt.edacrm) edacrm=edacr if(edbcr.gt.edbcrm) edbcrm=edbcr end if if(errag.gt.erragm) erragm=errag if(errbg.gt.errbgm) errbgm=errbg if(errac.gt.erracm) erracm=errac if(errbc.gt.errbcm) errbcm=errbc 30 continue agmv=agmv+erragm bgmv=bgmv+errbgm acmv=acmv+erracm bcmv=bcmv+errbcm amv=amv+erram bmv=bmv+errbm damv=damv+errdam dbmv=dbmv+errdbm acrmv=acrmv+eracrm bcrmv=bcrmv+erbcrm dacrmv=dacrmv+edacrm dbcrmv=dbcrmv+edbcrm 40 continue nu0=real(nu0v)/fndm1 nu0d=real(nu0dv)/fndm1 erragm=agmv/fndm1 errbgm=bgmv/fndm1 erracm=acmv/fndm1 errbcm=bcmv/fndm1 erram=amv/fndm1 errbm=bmv/fndm1 errdam=damv/fndm1 errdbm=dbmv/fndm1 eracrm=acrmv/fndm1 erbcrm=bcrmv/fndm1 edacrm=dacrmv/fndm1 edbcrm=dbcrmv/fndm1 if(ir.eq.1) then write(*,7) r,nu0,nu0d,erragm,errbgm,erracm,errbcm write(*,8) erram,errbm,errdam,errdbm write(*,9) eracrm,erbcrm,edacrm,edbcrm else write(*,7) r,nu0,nu0d,erragm,errbgm,erracm,errbcm write(*,11) erram,errbm,errdam,errdbm write(*,11) eracrm,erbcrm,edacrm,edbcrm end if 50 continue 60 continue 70 continue stop end C-END-OF-FILE cat < test11.out output of test11: AL = -0.80 BE = -0.80 GCHRI CHRI X NU0 NUD0 ERRA ERRB ERRA ERRB -1.0010 418 757 0.3315E-12 0.1954E-11 0.1967E-12 0.1973E-11 RECONSTR. 0.4121E-12 0.1759E-11 0.6109E-26 0.1496E-25 ERRORS 0.1691E-11 0.1741E-11 0.4847E-26 0.6185E-26 -1.0100 187 294 0.5758E-13 0.5721E-12 0.3121E-09 0.5416E-09 0.2416E-12 0.2811E-12 0.1565E-26 0.4356E-26 0.2274E-12 0.2902E-12 0.6058E-27 0.9665E-27 -1.0400 133 187 0.2392E-13 0.1517E-12 0.3429E-04 0.5172E-04 0.4263E-13 0.9975E-13 0.6058E-27 0.2103E-26 0.5684E-13 0.9068E-13 0.3534E-27 0.7070E-27 -1.0700 120 161 0.1988E-13 0.1125E-12 0.1632E-01 0.2355E-01 0.3553E-13 0.7399E-13 0.2524E-27 0.7173E-27 0.2487E-13 0.6348E-13 0.1515E-27 0.6070E-27 -1.1000 114 148 0.2710E-13 0.3729E-13 0.9958E-01 0.2060E+00 0.2487E-13 0.4981E-13 0.3534E-27 0.9020E-27 0.2842E-13 0.3554E-13 0.1010E-27 0.6443E-27 GCHRI CHRI RHO NU0 NUD0 ERRA ERRB ERRA ERRB 1.0500 390 700 0.5274E-11 0.6983E-11 0.1219E-12 0.2562E-12 RECONSTR. 0.5369E-11 0.7562E-11 0.1170E-24 0.1631E-24 ERRORS 0.2174E-13 0.6778E-13 0.3687E-27 0.1488E-26 1.1625 180 281 0.8953E-12 0.1482E-11 0.6328E-09 0.1240E-08 0.9370E-12 0.1402E-11 0.1925E-25 0.2083E-25 0.2337E-13 0.7197E-13 0.3421E-27 0.1482E-26 1.2750 142 204 0.3232E-12 0.5864E-12 0.1144E-05 0.1922E-05 0.3814E-12 0.5007E-12 0.7872E-26 0.1025E-25 0.2576E-13 0.7951E-13 0.3866E-27 0.1570E-26 1.3875 126 172 0.1879E-12 0.4715E-12 0.9375E-03 0.1478E-02 0.2789E-12 0.3418E-12 0.5324E-26 0.6553E-26 0.2421E-13 0.8292E-13 0.4358E-27 0.1598E-26 1.5000 117 154 0.1074E-12 0.2939E-12 0.1714E+01 0.1757E+01 0.1667E-12 0.2277E-12 0.1643E-26 0.2366E-26 0.3590E-13 0.7934E-13 0.3961E-27 0.1522E-26 AL = -0.80 BE = -0.40 GCHRI CHRI X NU0 NUD0 ERRA ERRB ERRA ERRB -1.0010 418 757 0.1723E-12 0.9979E-12 0.2615E-12 0.9979E-12 RECONSTR. 0.1000E-12 0.1991E-12 0.1988E-26 0.3139E-26 ERRORS 0.2871E-13 0.4381E-13 0.2777E-27 0.8087E-27 -1.0100 187 294 0.5698E-13 0.9621E-13 0.3988E-09 0.6927E-09 0.3954E-13 0.9241E-13 0.4341E-27 0.1262E-26 0.3325E-13 0.5116E-13 0.4039E-27 0.7070E-27 -1.0400 133 187 0.3830E-13 0.5217E-13 0.2327E-04 0.3511E-04 0.3226E-13 0.6396E-13 0.4218E-27 0.8089E-27 0.3290E-13 0.5111E-13 0.4039E-27 0.6610E-27 -1.0700 120 161 0.5094E-13 0.5525E-13 0.1324E-01 0.1766E-01 0.2572E-13 0.5685E-13 0.2425E-27 0.8585E-27 0.2534E-13 0.3876E-13 0.2019E-27 0.8585E-27 -1.1000 114 148 0.3352E-13 0.5429E-13 0.2529E+01 0.1239E+02 0.2498E-13 0.5426E-13 0.2612E-27 0.8079E-27 0.6323E-12 0.7390E-12 0.1824E-27 0.7633E-27 GCHRI CHRI RHO NU0 NUD0 ERRA ERRB ERRA ERRB 1.0500 390 700 0.3193E-11 0.3859E-11 0.1115E-12 0.2865E-12 RECONSTR. 0.3105E-11 0.3845E-11 0.7450E-25 0.1289E-24 ERRORS 0.2776E-13 0.6977E-13 0.3427E-27 0.1489E-26 1.1625 180 281 0.9485E-12 0.1285E-11 0.5262E-09 0.9256E-09 0.8135E-12 0.1760E-11 0.7811E-26 0.1490E-25 0.2393E-13 0.6853E-13 0.3573E-27 0.1601E-26 1.2750 142 204 0.1712E-12 0.2702E-12 0.1284E-05 0.2037E-05 0.1380E-12 0.3435E-12 0.3115E-26 0.4266E-26 0.2684E-13 0.7487E-13 0.3686E-27 0.1574E-26 1.3875 126 172 0.1014E-12 0.1881E-12 0.1187E-02 0.1866E-02 0.9373E-13 0.2042E-12 0.1692E-26 0.3351E-26 0.2937E-13 0.8194E-13 0.4175E-27 0.1543E-26 1.5000 117 154 0.1020E-12 0.1534E-12 0.3312E+01 0.3865E+01 0.8214E-13 0.2138E-12 0.1221E-26 0.2892E-26 0.3026E-13 0.8099E-13 0.4012E-27 0.1532E-26 AL = -0.80 BE = 0.00 GCHRI CHRI X NU0 NUD0 ERRA ERRB ERRA ERRB -1.0010 418 757 0.1110E-12 0.1737E-12 0.2454E-12 0.4785E-12 RECONSTR. 0.9591E-13 0.1919E-12 0.8804E-27 0.2020E-26 ERRORS 0.2649E-13 0.4277E-13 0.2430E-27 0.7069E-27 -1.0100 187 294 0.4148E-13 0.7587E-13 0.3793E-09 0.6589E-09 0.4390E-13 0.9248E-13 0.5350E-27 0.1262E-26 0.3153E-13 0.4221E-13 0.2370E-27 0.6064E-27 -1.0400 133 187 0.2575E-13 0.5653E-13 0.3146E-04 0.4746E-04 0.3508E-13 0.6461E-13 0.3043E-27 0.8088E-27 0.3296E-13 0.4377E-13 0.1925E-27 0.7092E-27 -1.0700 120 161 0.2967E-13 0.3738E-13 0.3554E-01 0.4509E-01 0.2795E-13 0.5743E-13 0.3206E-27 0.8079E-27 0.2819E-13 0.4221E-13 0.2740E-27 0.7069E-27 -1.1000 114 148 0.2075E-13 0.3967E-13 0.2695E+01 0.1529E+02 0.3150E-13 0.6461E-13 0.2468E-27 0.8079E-27 0.2699E-12 0.2629E-12 0.1922E-27 0.9845E-27 GCHRI CHRI RHO NU0 NUD0 ERRA ERRB ERRA ERRB 1.0500 390 700 0.4435E-11 0.1527E-10 0.1224E-12 0.2682E-12 RECONSTR. 0.4523E-11 0.1635E-10 0.4229E-25 0.1500E-24 ERRORS 0.2604E-13 0.7123E-13 0.3901E-27 0.1523E-26 1.1625 180 281 0.5911E-12 0.1323E-11 0.8296E-09 0.1404E-08 0.4474E-12 0.1700E-11 0.1240E-25 0.5148E-25 0.2557E-13 0.7043E-13 0.3846E-27 0.1555E-26 1.2750 142 204 0.1620E-12 0.3666E-12 0.1752E-05 0.3057E-05 0.1629E-12 0.4299E-12 0.4439E-26 0.1511E-25 0.2861E-13 0.7605E-13 0.3986E-27 0.1493E-26 1.3875 126 172 0.1706E-12 0.3539E-12 0.1743E-02 0.2953E-02 0.1359E-12 0.4584E-12 0.1606E-26 0.5440E-26 0.3168E-13 0.7822E-13 0.4346E-27 0.1534E-26 1.5000 117 154 0.4501E-13 0.9471E-13 0.1303E+02 0.8784E+04 0.5174E-13 0.1204E-12 0.8182E-27 0.2953E-26 0.5020E-10 0.1067E-09 0.4708E-27 0.1531E-26 AL = -0.80 BE = 0.40 GCHRI CHRI X NU0 NUD0 ERRA ERRB ERRA ERRB -1.0010 418 757 0.8002E-13 0.1542E-12 0.3122E-12 0.5998E-12 RECONSTR. 0.8554E-13 0.1777E-12 0.8655E-27 0.1717E-26 ERRORS 0.2759E-13 0.4481E-13 0.3192E-27 0.7592E-27 -1.0100 187 294 0.3928E-13 0.7272E-13 0.3221E-09 0.5595E-09 0.4129E-13 0.8528E-13 0.4781E-27 0.1011E-26 0.3147E-13 0.3623E-13 0.2976E-27 0.7075E-27 -1.0400 133 187 0.2595E-13 0.6442E-13 0.2268E-04 0.3422E-04 0.3129E-13 0.6396E-13 0.3470E-27 0.1011E-26 0.3167E-13 0.4223E-13 0.1861E-27 0.5838E-27 -1.0700 120 161 0.2261E-13 0.6932E-13 0.7784E-01 0.9098E-01 0.2842E-13 0.5687E-13 0.3824E-27 0.9611E-27 0.2813E-13 0.3558E-13 0.1982E-27 0.7592E-27 -1.1000 114 148 0.1775E-13 0.6730E-13 0.1042E+02 0.3878E+03 0.2436E-13 0.5228E-13 0.2091E-27 0.7070E-27 0.3987E-10 0.5082E-10 0.2509E-27 0.7014E-27 GCHRI CHRI RHO NU0 NUD0 ERRA ERRB ERRA ERRB 1.0500 390 700 0.2499E-11 0.7826E-11 0.1506E-12 0.2935E-12 RECONSTR. 0.2619E-11 0.8176E-11 0.5145E-25 0.8724E-25 ERRORS 0.2607E-13 0.6771E-13 0.3292E-27 0.1483E-26 1.1625 180 281 0.5460E-12 0.9349E-12 0.9497E-09 0.1567E-08 0.5615E-12 0.9333E-12 0.9752E-26 0.2661E-25 0.2548E-13 0.6883E-13 0.4029E-27 0.1576E-26 1.2750 142 204 0.1476E-12 0.3723E-12 0.1799E-05 0.3126E-05 0.1688E-12 0.3959E-12 0.3574E-26 0.1333E-25 0.2923E-13 0.7890E-13 0.4078E-27 0.1502E-26 1.3875 126 172 0.1097E-12 0.3103E-12 0.1975E-02 0.2864E-02 0.1257E-12 0.3847E-12 0.2048E-26 0.5004E-26 0.2985E-13 0.8439E-13 0.5027E-27 0.1501E-26 1.5000 117 154 0.4680E-13 0.1268E-12 0.7206E+01 0.2112E+03 0.4821E-13 0.1370E-12 0.9965E-27 0.2384E-26 0.2798E-12 0.7849E-13 0.4518E-27 0.1520E-26 AL = -0.80 BE = 0.80 GCHRI CHRI X NU0 NUD0 ERRA ERRB ERRA ERRB -1.0010 418 757 0.7854E-13 0.1653E-12 0.5212E-12 0.9583E-12 RECONSTR. 0.8171E-13 0.1635E-12 0.6816E-27 0.1313E-26 ERRORS 0.1421E-13 0.4462E-13 0.1515E-27 0.7146E-27 -1.0100 187 294 0.3995E-13 0.8425E-13 0.1672E-08 0.2901E-08 0.3908E-13 0.7879E-13 0.5301E-27 0.1061E-26 0.1776E-13 0.3575E-13 0.1262E-27 0.6212E-27 -1.0400 133 187 0.2702E-13 0.5299E-13 0.4345E-04 0.6555E-04 0.2487E-13 0.5730E-13 0.2777E-27 0.7588E-27 0.2132E-13 0.3554E-13 0.1515E-27 0.7363E-27 -1.0700 120 161 0.2487E-13 0.5313E-13 0.6629E-01 0.1215E+00 0.2842E-13 0.5690E-13 0.3282E-27 0.8097E-27 0.2132E-13 0.4265E-13 0.1010E-27 0.6065E-27 -1.1000 114 148 0.1858E-13 0.5101E-13 0.9659E-01 0.2103E+00 0.2132E-13 0.5921E-13 0.3029E-27 0.9188E-27 0.2132E-13 0.4265E-13 0.1262E-27 0.7557E-27 GCHRI CHRI RHO NU0 NUD0 ERRA ERRB ERRA ERRB 1.0500 390 700 0.4482E-11 0.8957E-11 0.2061E-12 0.4444E-12 RECONSTR. 0.4499E-11 0.8941E-11 0.1059E-24 0.2139E-24 ERRORS 0.2730E-13 0.6746E-13 0.3866E-27 0.1581E-26 1.1625 180 281 0.5135E-12 0.1092E-11 0.1299E-08 0.2370E-08 0.4848E-12 0.1137E-11 0.2629E-25 0.4886E-25 0.2814E-13 0.6966E-13 0.4517E-27 0.1496E-26 1.2750 142 204 0.2724E-12 0.7574E-12 0.2559E-05 0.4052E-05 0.3243E-12 0.8430E-12 0.8489E-26 0.2029E-25 0.3067E-13 0.7702E-13 0.4105E-27 0.1542E-26 1.3875 126 172 0.1456E-12 0.2503E-12 0.1898E-02 0.2613E-02 0.1378E-12 0.3144E-12 0.1388E-26 0.3524E-26 0.3286E-13 0.8032E-13 0.4396E-27 0.1602E-26 1.5000 117 154 0.5520E-13 0.1357E-12 0.2004E+01 0.3260E+01 0.5722E-13 0.1700E-12 0.8780E-27 0.3205E-26 0.4516E-13 0.9284E-13 0.4597E-27 0.1566E-26 AL = -0.40 BE = -0.40 GCHRI CHRI X NU0 NUD0 ERRA ERRB ERRA ERRB -1.0010 418 757 0.1055E-12 0.4934E-12 0.1422E-12 0.2553E-12 RECONSTR. 0.1421E-12 0.2122E-12 0.1010E-26 0.6331E-26 ERRORS 0.1563E-12 0.2049E-12 0.1515E-27 0.1010E-26 -1.0100 187 294 0.3862E-13 0.9011E-13 0.2594E-09 0.4505E-09 0.3553E-13 0.8526E-13 0.5301E-27 0.1333E-26 0.1421E-13 0.8195E-13 0.2019E-27 0.8077E-27 -1.0400 133 187 0.2226E-13 0.5382E-13 0.1541E-05 0.2325E-05 0.3553E-13 0.7105E-13 0.5049E-27 0.1411E-26 0.2132E-13 0.5122E-13 0.2019E-27 0.8077E-27 -1.0700 120 161 0.2027E-13 0.4648E-13 0.5046E-02 0.7051E-02 0.2132E-13 0.7104E-13 0.5049E-27 0.1010E-26 0.1421E-13 0.4263E-13 0.4039E-27 0.7968E-27 -1.1000 114 148 0.1750E-13 0.4873E-13 0.2164E+01 0.6175E+01 0.2132E-13 0.5684E-13 0.4544E-27 0.1110E-26 0.1421E-13 0.4263E-13 0.1010E-27 0.9085E-27 GCHRI CHRI RHO NU0 NUD0 ERRA ERRB ERRA ERRB 1.0500 390 700 0.1766E-11 0.3097E-11 0.9210E-13 0.1853E-12 RECONSTR. 0.1778E-11 0.3079E-11 0.4208E-25 0.7200E-25 ERRORS 0.2099E-13 0.8215E-13 0.3225E-27 0.1832E-26 1.1625 180 281 0.2765E-12 0.4128E-12 0.3438E-09 0.6342E-09 0.2816E-12 0.4057E-12 0.8094E-26 0.9444E-26 0.1898E-13 0.8206E-13 0.3049E-27 0.1636E-26 1.2750 142 204 0.1029E-12 0.1771E-12 0.6364E-06 0.9552E-06 0.1150E-12 0.1766E-12 0.2701E-26 0.4099E-26 0.2660E-13 0.8657E-13 0.3760E-27 0.1595E-26 1.3875 126 172 0.9231E-13 0.1619E-12 0.5098E-03 0.6863E-03 0.9817E-13 0.1533E-12 0.1481E-26 0.2507E-26 0.2627E-13 0.8965E-13 0.3562E-27 0.1572E-26 1.5000 117 154 0.4436E-13 0.9853E-13 0.6968E+00 0.8906E+00 0.5170E-13 0.1024E-12 0.1132E-26 0.2157E-26 0.2468E-13 0.9644E-13 0.3880E-27 0.1790E-26 AL = -0.40 BE = 0.00 GCHRI CHRI X NU0 NUD0 ERRA ERRB ERRA ERRB -1.0010 418 757 0.8112E-13 0.1532E-12 0.1484E-12 0.2857E-12 RECONSTR. 0.8837E-13 0.1705E-12 0.1005E-26 0.2624E-26 ERRORS 0.2082E-13 0.4263E-13 0.3211E-27 0.1119E-26 -1.0100 187 294 0.4021E-13 0.4324E-13 0.3834E-09 0.6660E-09 0.3825E-13 0.8525E-13 0.5749E-27 0.1514E-26 0.2082E-13 0.4263E-13 0.2215E-27 0.1211E-26 -1.0400 133 187 0.3355E-13 0.3802E-13 0.2218E-04 0.3347E-04 0.3436E-13 0.7104E-13 0.5776E-27 0.1310E-26 0.2220E-13 0.4263E-13 0.2451E-27 0.9085E-27 -1.0700 120 161 0.2539E-13 0.3092E-13 0.6418E-02 0.8705E-02 0.2792E-13 0.7103E-13 0.4230E-27 0.1312E-26 0.2082E-13 0.4263E-13 0.2956E-27 0.9083E-27 -1.1000 114 148 0.2289E-13 0.3549E-13 0.2915E+01 0.1941E+02 0.2691E-13 0.5683E-13 0.3603E-27 0.1403E-26 0.2193E-11 0.2714E-11 0.2089E-27 0.8076E-27 GCHRI CHRI RHO NU0 NUD0 ERRA ERRB ERRA ERRB 1.0500 390 700 0.1008E-11 0.1734E-11 0.9032E-13 0.2069E-12 RECONSTR. 0.9928E-12 0.1764E-11 0.2645E-25 0.4177E-25 ERRORS 0.2168E-13 0.8661E-13 0.3229E-27 0.1801E-26 1.1625 180 281 0.2617E-12 0.4090E-12 0.3477E-09 0.7223E-09 0.2515E-12 0.4482E-12 0.5493E-26 0.1186E-25 0.2113E-13 0.8297E-13 0.3508E-27 0.1763E-26 1.2750 142 204 0.7270E-13 0.1412E-12 0.6745E-06 0.1153E-05 0.7355E-13 0.1670E-12 0.1374E-26 0.3309E-26 0.2456E-13 0.8893E-13 0.3780E-27 0.1602E-26 1.3875 126 172 0.6747E-13 0.1178E-12 0.8101E-03 0.1131E-02 0.6830E-13 0.1469E-12 0.1461E-26 0.2757E-26 0.2708E-13 0.8893E-13 0.4179E-27 0.1571E-26 1.5000 117 154 0.4668E-13 0.9230E-13 0.8190E+00 0.2569E+01 0.4895E-13 0.1106E-12 0.6453E-27 0.1840E-26 0.3807E-13 0.1036E-12 0.3993E-27 0.1891E-26 AL = -0.40 BE = 0.40 GCHRI CHRI X NU0 NUD0 ERRA ERRB ERRA ERRB -1.0010 418 757 0.1153E-12 0.1798E-12 0.1359E-12 0.2320E-12 RECONSTR. 0.8527E-13 0.1989E-12 0.9593E-27 0.2019E-26 ERRORS 0.1421E-13 0.5683E-13 0.2019E-27 0.9079E-27 -1.0100 187 294 0.6764E-13 0.8990E-13 0.1332E-09 0.2314E-09 0.4263E-13 0.9945E-13 0.6563E-27 0.1212E-26 0.1421E-13 0.4263E-13 0.1515E-27 0.9065E-27 -1.0400 133 187 0.4197E-13 0.5997E-13 0.4913E-05 0.7413E-05 0.2842E-13 0.7105E-13 0.4544E-27 0.1110E-26 0.1066E-13 0.4263E-13 0.1515E-27 0.9935E-27 -1.0700 120 161 0.2155E-13 0.5792E-13 0.1616E-01 0.2141E-01 0.2842E-13 0.7104E-13 0.5049E-27 0.1212E-26 0.1066E-13 0.4263E-13 0.1515E-27 0.9085E-27 -1.1000 114 148 0.1783E-13 0.4977E-13 0.9600E-01 0.2099E+00 0.2132E-13 0.5684E-13 0.5049E-27 0.1010E-26 0.1421E-13 0.4263E-13 0.1010E-27 0.8075E-27 GCHRI CHRI RHO NU0 NUD0 ERRA ERRB ERRA ERRB 1.0500 390 700 0.1291E-11 0.2854E-11 0.9911E-13 0.2466E-12 RECONSTR. 0.1253E-11 0.2883E-11 0.2577E-25 0.5229E-25 ERRORS 0.2090E-13 0.8300E-13 0.2936E-27 0.1749E-26 1.1625 180 281 0.1954E-12 0.4806E-12 0.5130E-09 0.9100E-09 0.2004E-12 0.4693E-12 0.3354E-26 0.6091E-26 0.2169E-13 0.8531E-13 0.3587E-27 0.1714E-26 1.2750 142 204 0.9223E-13 0.2036E-12 0.6724E-06 0.1067E-05 0.9490E-13 0.2274E-12 0.1550E-26 0.3518E-26 0.2543E-13 0.9216E-13 0.3896E-27 0.1552E-26 1.3875 126 172 0.3876E-13 0.1077E-12 0.7110E-03 0.1203E-02 0.4456E-13 0.1173E-12 0.1125E-26 0.2302E-26 0.2534E-13 0.8966E-13 0.3943E-27 0.1602E-26 1.5000 117 154 0.4200E-13 0.1137E-12 0.2225E+01 0.2295E+03 0.4231E-13 0.1301E-12 0.7301E-27 0.1911E-26 0.1687E-11 0.9994E-13 0.4604E-27 0.1710E-26 AL = -0.40 BE = 0.80 GCHRI CHRI X NU0 NUD0 ERRA ERRB ERRA ERRB -1.0010 418 757 0.7688E-13 0.1211E-12 0.8316E-12 0.1616E-11 RECONSTR. 0.6794E-13 0.1564E-12 0.6059E-27 0.1010E-26 ERRORS 0.2992E-13 0.4300E-13 0.2908E-27 0.6564E-27 -1.0100 187 294 0.4195E-13 0.7202E-13 0.1697E-08 0.2945E-08 0.4263E-13 0.8551E-13 0.4472E-27 0.1111E-26 0.3381E-13 0.4328E-13 0.2777E-27 0.8909E-27 -1.0400 133 187 0.2784E-13 0.4507E-13 0.8977E-04 0.1353E-03 0.3166E-13 0.5707E-13 0.3424E-27 0.8096E-27 0.2978E-13 0.3557E-13 0.2251E-27 0.8083E-27 -1.0700 120 161 0.2238E-13 0.4770E-13 0.8175E-01 0.9486E-01 0.2282E-13 0.6396E-13 0.3362E-27 0.1010E-26 0.2842E-13 0.3670E-13 0.2460E-27 0.6059E-27 -1.1000 114 148 0.1939E-13 0.3939E-13 0.3124E+01 0.2365E+02 0.2483E-13 0.5685E-13 0.3181E-27 0.8079E-27 0.9643E-11 0.1231E-10 0.2242E-27 0.8080E-27 GCHRI CHRI RHO NU0 NUD0 ERRA ERRB ERRA ERRB 1.0500 390 700 0.1361E-11 0.2878E-11 0.1178E-12 0.2426E-12 RECONSTR. 0.1368E-11 0.2869E-11 0.3079E-25 0.6244E-25 ERRORS 0.2239E-13 0.6565E-13 0.3345E-27 0.1488E-26 1.1625 180 281 0.1814E-12 0.4410E-12 0.8383E-09 0.1608E-08 0.1879E-12 0.4486E-12 0.4548E-26 0.8309E-26 0.2228E-13 0.7190E-13 0.3817E-27 0.1502E-26 1.2750 142 204 0.1110E-12 0.2292E-12 0.1409E-05 0.2267E-05 0.1147E-12 0.2563E-12 0.1808E-26 0.4029E-26 0.2611E-13 0.7705E-13 0.3928E-27 0.1616E-26 1.3875 126 172 0.5591E-13 0.1305E-12 0.1491E-02 0.2590E-02 0.5530E-13 0.1475E-12 0.1020E-26 0.2879E-26 0.2518E-13 0.7867E-13 0.3600E-27 0.1585E-26 1.5000 117 154 0.4225E-13 0.1006E-12 0.8630E+00 0.5130E+01 0.3970E-13 0.1269E-12 0.7575E-27 0.2218E-26 0.7483E-13 0.1430E-12 0.4123E-27 0.1629E-26 AL = 0.00 BE = 0.00 GCHRI CHRI X NU0 NUD0 ERRA ERRB ERRA ERRB -1.0010 418 757 0.8000E-13 0.1559E-12 0.1013E-12 0.1647E-12 RECONSTR. 0.8527E-13 0.1705E-12 0.1010E-26 0.2423E-26 ERRORS 0.1421E-13 0.5329E-13 0.2019E-27 0.1211E-26 -1.0100 187 294 0.4016E-13 0.6907E-13 0.1396E-09 0.2424E-09 0.3553E-13 0.9946E-13 0.6058E-27 0.1211E-26 0.7105E-14 0.4262E-13 0.1515E-27 0.9080E-27 -1.0400 133 187 0.3590E-13 0.4759E-13 0.5944E-05 0.8970E-05 0.2842E-13 0.7103E-13 0.5554E-27 0.1312E-26 0.7105E-14 0.4263E-13 0.1010E-27 0.9080E-27 -1.0700 120 161 0.2194E-13 0.4850E-13 0.5334E-02 0.7460E-02 0.2842E-13 0.7104E-13 0.6058E-27 0.1211E-26 0.7105E-14 0.4263E-13 0.1010E-27 0.7062E-27 -1.1000 114 148 0.2238E-13 0.4359E-13 0.4163E+01 0.4959E+02 0.2132E-13 0.5683E-13 0.3534E-27 0.1009E-26 0.1549E-11 0.1833E-11 0.1010E-27 0.6057E-27 GCHRI CHRI RHO NU0 NUD0 ERRA ERRB ERRA ERRB 1.0500 390 700 0.7879E-12 0.1440E-11 0.7685E-13 0.1556E-12 RECONSTR. 0.7814E-12 0.1433E-11 0.1768E-25 0.3042E-25 ERRORS 0.2024E-13 0.8442E-13 0.3016E-27 0.1742E-26 1.1625 180 281 0.1606E-12 0.2999E-12 0.3123E-09 0.5569E-09 0.1645E-12 0.2924E-12 0.3396E-26 0.6480E-26 0.2029E-13 0.8439E-13 0.3096E-27 0.1611E-26 1.2750 142 204 0.6252E-13 0.1287E-12 0.4562E-06 0.6162E-06 0.6554E-13 0.1279E-12 0.1541E-26 0.3061E-26 0.2295E-13 0.8970E-13 0.3579E-27 0.1646E-26 1.3875 126 172 0.4416E-13 0.9666E-13 0.3978E-03 0.6277E-03 0.4670E-13 0.1190E-12 0.9868E-27 0.2529E-26 0.2342E-13 0.8815E-13 0.3554E-27 0.1525E-26 1.5000 117 154 0.3991E-13 0.7966E-13 0.4906E+00 0.2339E+01 0.4207E-13 0.9064E-13 0.6932E-27 0.1676E-26 0.3805E-13 0.8971E-13 0.4351E-27 0.1744E-26 AL = 0.00 BE = 0.40 GCHRI CHRI X NU0 NUD0 ERRA ERRB ERRA ERRB -1.0010 418 757 0.7355E-13 0.1381E-12 0.2888E-12 0.5448E-12 RECONSTR. 0.8432E-13 0.1705E-12 0.1010E-26 0.1817E-26 ERRORS 0.2309E-13 0.4263E-13 0.4418E-27 0.1009E-26 -1.0100 187 294 0.4425E-13 0.7063E-13 0.8422E-09 0.1463E-08 0.4623E-13 0.9946E-13 0.6792E-27 0.1413E-26 0.2309E-13 0.4263E-13 0.2351E-27 0.8076E-27 -1.0400 133 187 0.3204E-13 0.3418E-13 0.3243E-04 0.4892E-04 0.3161E-13 0.7105E-13 0.5204E-27 0.1100E-26 0.2087E-13 0.4263E-13 0.2357E-27 0.8075E-27 -1.0700 120 161 0.2713E-13 0.3242E-13 0.1444E-01 0.1920E-01 0.2792E-13 0.7104E-13 0.4112E-27 0.1111E-26 0.2087E-13 0.4263E-13 0.2481E-27 0.9077E-27 -1.1000 114 148 0.2071E-13 0.3101E-13 0.1458E+02 0.7854E+03 0.2468E-13 0.7104E-13 0.4403E-27 0.1110E-26 0.2455E-10 0.3130E-10 0.2815E-27 0.1110E-26 GCHRI CHRI RHO NU0 NUD0 ERRA ERRB ERRA ERRB 1.0500 390 700 0.6120E-12 0.1124E-11 0.1014E-12 0.1965E-12 RECONSTR. 0.6074E-12 0.1124E-11 0.1518E-25 0.2907E-25 ERRORS 0.2072E-13 0.8384E-13 0.2932E-27 0.1742E-26 1.1625 180 281 0.1145E-12 0.2637E-12 0.6195E-09 0.1060E-08 0.1178E-12 0.2696E-12 0.3372E-26 0.5855E-26 0.2229E-13 0.8594E-13 0.3548E-27 0.1726E-26 1.2750 142 204 0.5963E-13 0.1289E-12 0.1040E-05 0.1742E-05 0.6211E-13 0.1480E-12 0.1244E-26 0.2607E-26 0.2383E-13 0.9102E-13 0.3987E-27 0.1693E-26 1.3875 126 172 0.4241E-13 0.8636E-13 0.9439E-03 0.1514E-02 0.4268E-13 0.1216E-12 0.8951E-27 0.2042E-26 0.2353E-13 0.9131E-13 0.3710E-27 0.1625E-26 1.5000 117 154 0.3012E-13 0.7109E-13 0.1490E+01 0.3953E+02 0.3313E-13 0.9038E-13 0.5992E-27 0.1717E-26 0.1266E-12 0.2594E-12 0.4115E-27 0.1947E-26 AL = 0.00 BE = 0.80 GCHRI CHRI X NU0 NUD0 ERRA ERRB ERRA ERRB -1.0010 418 757 0.7369E-13 0.1170E-12 0.8853E-12 0.1713E-11 RECONSTR. 0.7792E-13 0.1634E-12 0.7450E-27 0.1262E-26 ERRORS 0.3036E-13 0.4315E-13 0.1996E-27 0.6263E-27 -1.0100 187 294 0.4826E-13 0.4692E-13 0.1269E-08 0.2203E-08 0.4226E-13 0.9948E-13 0.3726E-27 0.9089E-27 0.3387E-13 0.4264E-13 0.2272E-27 0.7574E-27 -1.0400 133 187 0.3465E-13 0.3311E-13 0.9230E-04 0.1392E-03 0.3763E-13 0.7112E-13 0.4226E-27 0.8088E-27 0.2820E-13 0.4269E-13 0.2314E-27 0.6066E-27 -1.0700 120 161 0.2469E-13 0.2408E-13 0.8856E-01 0.1016E+00 0.2718E-13 0.5698E-13 0.2985E-27 0.8092E-27 0.3531E-13 0.4267E-13 0.2299E-27 0.8092E-27 -1.1000 114 148 0.2285E-13 0.2810E-13 0.2435E+01 0.1080E+02 0.2540E-13 0.5705E-13 0.2538E-27 0.8127E-27 0.6097E-13 0.4289E-13 0.2388E-27 0.6579E-27 GCHRI CHRI RHO NU0 NUD0 ERRA ERRB ERRA ERRB 1.0500 390 700 0.9080E-12 0.1850E-11 0.1105E-12 0.2241E-12 RECONSTR. 0.9053E-12 0.1846E-11 0.1519E-25 0.2865E-25 ERRORS 0.2075E-13 0.6609E-13 0.3000E-27 0.1513E-26 1.1625 180 281 0.1598E-12 0.3159E-12 0.9542E-09 0.1595E-08 0.1529E-12 0.3360E-12 0.2888E-26 0.5715E-26 0.2187E-13 0.7036E-13 0.3311E-27 0.1526E-26 1.2750 142 204 0.7354E-13 0.1415E-12 0.1494E-05 0.2520E-05 0.7319E-13 0.1619E-12 0.9811E-27 0.2247E-26 0.2552E-13 0.7608E-13 0.3767E-27 0.1533E-26 1.3875 126 172 0.4052E-13 0.8763E-13 0.1260E-02 0.2106E-02 0.4235E-13 0.1112E-12 0.6484E-27 0.1903E-26 0.2478E-13 0.7667E-13 0.3898E-27 0.1500E-26 1.5000 117 154 0.2867E-13 0.6718E-13 0.1414E+01 0.6410E+01 0.3082E-13 0.8431E-13 0.5724E-27 0.1459E-26 0.6562E-13 0.1345E-12 0.4061E-27 0.1611E-26 AL = 0.40 BE = 0.40 GCHRI CHRI X NU0 NUD0 ERRA ERRB ERRA ERRB -1.0010 418 757 0.7326E-13 0.1307E-12 0.1418E-12 0.2534E-12 RECONSTR. 0.7105E-13 0.1563E-12 0.9340E-27 0.2019E-26 ERRORS 0.2132E-13 0.4263E-13 0.1515E-27 0.1110E-26 -1.0100 187 294 0.3336E-13 0.6097E-13 0.3035E-09 0.5270E-09 0.3553E-13 0.8526E-13 0.6058E-27 0.1211E-26 0.2132E-13 0.4263E-13 0.1515E-27 0.1009E-26 -1.0400 133 187 0.2879E-13 0.7564E-13 0.5098E-05 0.7691E-05 0.2842E-13 0.7105E-13 0.4544E-27 0.1212E-26 0.1421E-13 0.4263E-13 0.1515E-27 0.8077E-27 -1.0700 120 161 0.2236E-13 0.1025E-12 0.4853E-01 0.5993E-01 0.2132E-13 0.5684E-13 0.4544E-27 0.1010E-26 0.1421E-13 0.4263E-13 0.1010E-27 0.8076E-27 -1.1000 114 148 0.2298E-13 0.6298E-13 0.9545E-01 0.2099E+00 0.2842E-13 0.7105E-13 0.4039E-27 0.1111E-26 0.2842E-13 0.4263E-13 0.1515E-27 0.9081E-27 GCHRI CHRI RHO NU0 NUD0 ERRA ERRB ERRA ERRB 1.0500 390 700 0.8015E-12 0.1524E-11 0.6982E-13 0.1466E-12 RECONSTR. 0.7985E-12 0.1522E-11 0.1386E-25 0.2583E-25 ERRORS 0.1973E-13 0.8073E-13 0.3082E-27 0.1830E-26 1.1625 180 281 0.1076E-12 0.2102E-12 0.3717E-09 0.6726E-09 0.1101E-12 0.2174E-12 0.2474E-26 0.5140E-26 0.2066E-13 0.8366E-13 0.3142E-27 0.1700E-26 1.2750 142 204 0.4763E-13 0.1273E-12 0.7932E-06 0.1319E-05 0.4787E-13 0.1317E-12 0.1365E-26 0.3244E-26 0.2291E-13 0.8876E-13 0.3692E-27 0.1587E-26 1.3875 126 172 0.3622E-13 0.1080E-12 0.4788E-03 0.6342E-03 0.3941E-13 0.9886E-13 0.6826E-27 0.2141E-26 0.2435E-13 0.8897E-13 0.3454E-27 0.1625E-26 1.5000 117 154 0.2440E-13 0.9023E-13 0.7914E+00 0.7183E+00 0.2833E-13 0.8249E-13 0.5964E-27 0.1617E-26 0.2520E-13 0.9187E-13 0.4074E-27 0.1810E-26 AL = 0.40 BE = 0.80 GCHRI CHRI X NU0 NUD0 ERRA ERRB ERRA ERRB -1.0010 418 757 0.8512E-13 0.1463E-12 0.7240E-12 0.1402E-11 RECONSTR. 0.7764E-13 0.1635E-12 0.6779E-27 0.1111E-26 ERRORS 0.2834E-13 0.4362E-13 0.2895E-27 0.8081E-27 -1.0100 187 294 0.4447E-13 0.8037E-13 0.5770E-09 0.1001E-08 0.4627E-13 0.9240E-13 0.4846E-27 0.1212E-26 0.3149E-13 0.4547E-13 0.2903E-27 0.6564E-27 -1.0400 133 187 0.3072E-13 0.5598E-13 0.1903E-04 0.2870E-04 0.3169E-13 0.7157E-13 0.5049E-27 0.1015E-26 0.3500E-13 0.4314E-13 0.2434E-27 0.7593E-27 -1.0700 120 161 0.2263E-13 0.5858E-13 0.1868E+00 0.1851E+00 0.2436E-13 0.5089E-13 0.3182E-27 0.7072E-27 0.2887E-13 0.4547E-13 0.2236E-27 0.6199E-27 -1.1000 114 148 0.2729E-13 0.5210E-13 0.9876E-01 0.2082E+00 0.2479E-13 0.5089E-13 0.3278E-27 0.1011E-26 0.2793E-13 0.4547E-13 0.1968E-27 0.7578E-27 GCHRI CHRI RHO NU0 NUD0 ERRA ERRB ERRA ERRB 1.0500 390 700 0.4252E-12 0.8926E-12 0.1304E-12 0.2746E-12 RECONSTR. 0.4219E-12 0.8852E-12 0.1239E-25 0.2286E-25 ERRORS 0.1982E-13 0.6891E-13 0.3217E-27 0.1447E-26 1.1625 180 281 0.8686E-13 0.1980E-12 0.5451E-09 0.1015E-08 0.8752E-13 0.2027E-12 0.1957E-26 0.3948E-26 0.1950E-13 0.7194E-13 0.3419E-27 0.1505E-26 1.2750 142 204 0.4985E-13 0.1115E-12 0.1033E-05 0.1639E-05 0.4849E-13 0.1239E-12 0.9670E-27 0.2351E-26 0.2345E-13 0.7715E-13 0.3541E-27 0.1525E-26 1.3875 126 172 0.3595E-13 0.8931E-13 0.8559E-03 0.1256E-02 0.3662E-13 0.1102E-12 0.6433E-27 0.1863E-26 0.2493E-13 0.8152E-13 0.3616E-27 0.1552E-26 1.5000 117 154 0.2893E-13 0.7836E-13 0.1462E+01 0.1453E+01 0.2897E-13 0.8530E-13 0.4834E-27 0.1445E-26 0.2620E-13 0.7580E-13 0.4475E-27 0.1514E-26 AL = 0.80 BE = 0.80 GCHRI CHRI X NU0 NUD0 ERRA ERRB ERRA ERRB -1.0010 418 757 0.7488E-13 0.1314E-12 0.9170E-13 0.1531E-12 RECONSTR. 0.7461E-13 0.1493E-12 0.8078E-27 0.1566E-26 ERRORS 0.1421E-13 0.3615E-13 0.1262E-27 0.8586E-27 -1.0100 187 294 0.4156E-13 0.6021E-13 0.4147E-09 0.7198E-09 0.3908E-13 0.8530E-13 0.4039E-27 0.1111E-26 0.1776E-13 0.3653E-13 0.1262E-27 0.7075E-27 -1.0400 133 187 0.2368E-13 0.4148E-13 0.2386E-04 0.3599E-04 0.2842E-13 0.5752E-13 0.3534E-27 0.8089E-27 0.2132E-13 0.3555E-13 0.1010E-27 0.7850E-27 -1.0700 120 161 0.2023E-13 0.4990E-13 0.3446E-01 0.5281E-01 0.2487E-13 0.4978E-13 0.3029E-27 0.8092E-27 0.1421E-13 0.3555E-13 0.1515E-27 0.6749E-27 -1.1000 114 148 0.2430E-13 0.3831E-13 0.1000E+00 0.2031E+00 0.2132E-13 0.4978E-13 0.2777E-27 0.9090E-27 0.2132E-13 0.4265E-13 0.1010E-27 0.5556E-27 GCHRI CHRI RHO NU0 NUD0 ERRA ERRB ERRA ERRB 1.0500 390 700 0.4256E-12 0.7942E-12 0.8814E-13 0.1880E-12 RECONSTR. 0.4263E-12 0.7829E-12 0.1074E-25 0.2151E-25 ERRORS 0.1828E-13 0.6616E-13 0.3129E-27 0.1507E-26 1.1625 180 281 0.7793E-13 0.1627E-12 0.5387E-09 0.9900E-09 0.7769E-13 0.1727E-12 0.2092E-26 0.4358E-26 0.1968E-13 0.6674E-13 0.3378E-27 0.1496E-26 1.2750 142 204 0.4189E-13 0.9261E-13 0.9251E-06 0.1410E-05 0.4436E-13 0.1137E-12 0.9784E-27 0.2439E-26 0.2183E-13 0.7740E-13 0.3619E-27 0.1516E-26 1.3875 126 172 0.2921E-13 0.6972E-13 0.8895E-03 0.1377E-02 0.3197E-13 0.1053E-12 0.6557E-27 0.2077E-26 0.2281E-13 0.7882E-13 0.3845E-27 0.1589E-26 1.5000 117 154 0.2402E-13 0.5503E-13 0.1806E+01 0.3862E+01 0.2478E-13 0.8190E-13 0.4607E-27 0.1374E-26 0.5806E-13 0.1146E-12 0.3662E-27 0.1525E-26 C-END-OF-FILE ################################## # # # 2. CLASSICAL WEIGHT FUNCTIONS # # # ################################## cat < recur.f c c subroutine recur(n,ipoly,al,be,a,b,ierr) c c This subroutine generates the coefficients a(k),b(k), k=0,1,...,n-1, c in the recurrence relation c c p(k+1)(x)=(x-a(k))*p(k)(x)-b(k)*p(k-1)(x), c k=0,1,...,n-1, c c p(-1)(x)=0, p(0)(x)=1, c c for some classical (monic) orthogonal polynomials, and sets b(0) c equal to the total mass of the weight distribution. The results are c stored in the arrays a,b, which hold, respectively, the coefficients c a(k-1),b(k-1), k=1,2,...,n. c c Input: n - - the number of recursion coefficients desired c ipoly-integer identifying the polynomial as follows: c 1=Legendre polynomial on (-1,1) c 2=Legendre polynomial on (0,1) c 3=Chebyshev polynomial of the first kind c 4=Chebyshev polynomial of the second kind c 5=Jacobi polynomial with parameters al=-.5,be=.5 c 6=Jacobi polynomial with parameters al,be c 7=generalized Laguerre polynomial with c parameter al c 8=Hermite polynomial c al,be-input parameters for Jacobi and generalized c Laguerre polynomials c c Output: a,b - arrays containing, respectively, the recursion c coefficients a(k-1),b(k-1), k=1,2,...,n. c ierr -an error flag, equal to 0 on normal return, c equal to 1 if al or be are out of range c when ipoly=6 or ipoly=7, equal to 2 if b(0) c overflows when ipoly=6 or ipoly=7, equal to 3 c if n is out of range, and equal to 4 if ipoly c is not an admissible integer. In the case ierr=2, c the coefficient b(0) is set equal to the largest c machine-representable number. c c The subroutine calls for the function subroutines r1mach,gamma and c alga. The routines gamma and alga, which are included in this file, c evaluate respectively the gamma function and its logarithm for c positive arguments. They are used only in the cases ipoly=6 and c ipoly=7. c external gamma dimension a(n),b(n) if(n.lt.1) then ierr=3 return end if almach=alog(r1mach(2)) ierr=0 do 10 k=1,n a(k)=0. 10 continue if(ipoly.eq.1) then b(1)=2. if (n.eq.1) return do 20 k=2,n fkm1=real(k-1) b(k)=1./(4.-1./(fkm1*fkm1)) 20 continue return else if (ipoly.eq.2) then a(1)=.5 b(1)=1. if(n.eq.1) return do 30 k=2,n a(k)=.5 fkm1=real(k-1) b(k)=.25/(4.-1./(fkm1*fkm1)) 30 continue return else if(ipoly.eq.3) then b(1)=4.*atan(1.) if(n.eq.1) return b(2)=.5 if(n.eq.2) return do 40 k=3,n b(k)=.25 40 continue return else if(ipoly.eq.4) then b(1)=2.*atan(1.) if(n.eq.1) return do 50 k=2,n b(k)=.25 50 continue return else if(ipoly.eq.5) then b(1)=4.*atan(1.) a(1)=.5 if(n.eq.1) return do 60 k=2,n b(k)=.25 60 continue return else if(ipoly.eq.6) then if(al.le.-1. .or. be.le.-1.) then ierr=1 return else alpbe=al+be a(1)=(be-al)/(alpbe+2.) t=(alpbe+1.)*alog(2.)+alga(al+1.)+alga(be+1.)- * alga(alpbe+2.) if(t.gt.almach) then ierr=2 b(1)=r1mach(2) else b(1)=exp(t) end if if(n.eq.1) return al2=al*al be2=be*be a(2)=(be2-al2)/((alpbe+2.)*(alpbe+4.)) b(2)=4.*(al+1.)*(be+1.)/((alpbe+3.)*(alpbe+2.)**2) if(n.eq.2) return do 70 k=3,n fkm1=real(k-1) a(k)=.25*(be2-al2)/(fkm1*fkm1*(1.+.5*alpbe/fkm1)* * (1.+.5*(alpbe+2.)/fkm1)) b(k)=.25*(1.+al/fkm1)*(1.+be/fkm1)*(1.+alpbe/fkm1)/ * ((1.+.5*(alpbe+1.)/fkm1)*(1.+.5*(alpbe-1.)/fkm1) * *(1.+.5*alpbe/fkm1)**2) 70 continue return end if else if(ipoly.eq.7) then if(al.le.-1.) then ierr=1 return else a(1)=al+1. b(1)=gamma(al+1.,ierr) if(ierr.eq.2) b(1)=r1mach(2) if(n.eq.1) return do 80 k=2,n fkm1=real(k-1) a(k)=2.*fkm1+al+1. b(k)=fkm1*(fkm1+al) 80 continue return end if else if(ipoly.eq.8) then b(1)=sqrt(4.*atan(1.)) if(n.eq.1) return do 90 k=2,n b(k)=.5*real(k-1) 90 continue return else ierr=4 end if end function alga(x) c c This is an auxiliary function subroutine (not optimized in any c sense) evaluating the logarithm of the gamma function for positive c arguments x. It is called by the subroutine gamma. The integer m0 c in the first executable statement is the smallest integer m such c that 1*3*5* ... *(2*m+1)/(2**m) is greater than or equal to the c largest machine-representable number. The routine is based on a c rational approximation valid on [.5,1.5] due to W.J. Cody and c K.E. Hillstrom; see Math. Comp. 21, 1967, 198-203, in particular the c case n=7 in Table II. For the computation of m0 it calls upon the c function subroutines t and r1mach. The former, appended below, c evaluates the inverse function t = t(y) of y = t ln t. c dimension cnum(8),cden(8) data cnum/4.120843185847770,85.68982062831317,243.175243524421, *-261.7218583856145,-922.2613728801522,-517.6383498023218, *-77.41064071332953,-2.208843997216182/, *cden/1.,45.64677187585908,377.8372484823942,951.323597679706, *846.0755362020782,262.3083470269460,24.43519662506312, *.4097792921092615/ c c The constants in the statement below are exp(1.) and .5*alog(8.). c m0=2.71828*t((alog(r1mach(2))-1.03972)/2.71828) xi=aint(x) if(x-xi.gt..5) xi=xi+1. m=ifix(xi)-1 c c Computation of log gamma on the standard interval (1/2,3/2] c xe=x-real(m) snum=cnum(1) sden=cden(1) do 10 k=2,8 snum=xe*snum+cnum(k) sden=xe*sden+cden(k) 10 continue alga=(xe-1.)*snum/sden c c Computation of log gamma on (0,1/2] c if(m.eq.-1) then alga=alga-alog(x) return else if(m.eq.0) then return else c c Computation of log gamma on (3/2,5/2] c p=xe if(m.eq.1) then alga=alga+alog(p) return else c c Computation of log gamma for arguments larger than 5/2 c mm1=m-1 c c The else-clause in the next statement is designed to avoid possible c overflow in the computation of p in the if-clause, at the expense c of computing many logarithms. c if(m.lt.m0) then do 20 k=1,mm1 p=(xe+real(k))*p 20 continue alga=alga+alog(p) return else alga=alga+alog(xe) do 30 k=1,mm1 alga=alga+alog(xe+real(k)) 30 continue return end if end if end if end function gamma(x,ierr) c c This evaluates the gamma function for real positive x, using the c function subroutines alga and r1mach. In case of overflow, the c routine returns the largest machine-representable number and the c error flag ierr=2. c almach=alog(r1mach(2)) ierr=0 t=alga(x) if(t.ge.almach) then ierr=2 gamma=r1mach(2) return else gamma=exp(t) return end if end function t(y) c c This evaluates the inverse function t = t(y) of y = t ln t for c nonnegative y to an accuracy of about one percent. For the c approximation used, see pp. 51-52 in W. Gautschi,``Computational c aspects of three-term recurrence relations'', SIAM Rev. 9, 1967, c 24-82. c if(y.le.10.) then p=.000057941*y-.00176148 p=y*p+.0208645 p=y*p-.129013 p=y*p+.85777 t=y*p+1.0125 else z=alog(y)-.775 p=(.775-alog(z))/(1.+z) p=1./(1.+p) t=y*p/z end if return end C-END-OF-FILE cat < drecur.f c c subroutine drecur(n,ipoly,dal,dbe,da,db,iderr) c c This is a double-precision version of the routine recur. c external dgamma double precision dal,dbe,da,db,dlmach,d1mach,dkm1,dalpbe,dt, *dlga,dal2,dbe2,dgamma dimension da(n),db(n) if(n.lt.1) then iderr=3 return end if dlmach=dlog(d1mach(2)) iderr=0 do 10 k=1,n da(k)=0.d0 10 continue if(ipoly.eq.1) then db(1)=2.d0 if (n.eq.1) return do 20 k=2,n dkm1=dble(k-1) db(k)=1.d0/(4.d0-1.d0/(dkm1*dkm1)) 20 continue return else if(ipoly.eq.2) then da(1)=.5d0 db(1)=1.d0 if(n.eq.1) return do 30 k=2,n da(k)=.5d0 dkm1=dble(k-1) db(k)=.25d0/(4.d0-1.d0/(dkm1*dkm1)) 30 continue return else if(ipoly.eq.3) then db(1)=4.d0*datan(1.d0) if(n.eq.1) return db(2)=.5d0 if(n.eq.2) return do 40 k=3,n db(k)=.25d0 40 continue return else if(ipoly.eq.4) then db(1)=2.d0*datan(1.d0) if(n.eq.1) return do 50 k=2,n db(k)=.25d0 50 continue return else if(ipoly.eq.5) then db(1)=4.d0*datan(1.d0) da(1)=.5d0 if(n.eq.1) return do 60 k=2,n db(k)=.25d0 60 continue return else if(ipoly.eq.6) then if(dal.le.-1.d0 .or. dbe.le.-1.d0) then iderr=1 return else dalpbe=dal+dbe da(1)=(dbe-dal)/(dalpbe+2.d0) dt=(dalpbe+1.d0)*dlog(2.d0)+dlga(dal+1.d0)+dlga(dbe+1.d0)- * dlga(dalpbe+2.d0) if(dt.gt.dlmach) then iderr=2 db(1)=d1mach(2) else db(1)=dexp(dt) end if if(n.eq.1) return dal2=dal*dal dbe2=dbe*dbe da(2)=(dbe2-dal2)/((dalpbe+2.d0)*(dalpbe+4.d0)) db(2)=4.d0*(dal+1.d0)*(dbe+1.d0)/((dalpbe+3.d0)*(dalpbe+ * 2.d0)**2) if(n.eq.2) return do 70 k=3,n dkm1=dble(k-1) da(k)=.25d0*(dbe2-dal2)/(dkm1*dkm1*(1.d0+.5d0*dalpbe/dkm1) * *(1.d0+.5d0*(dalpbe+2.d0)/dkm1)) db(k)=.25d0*(1.d0+dal/dkm1)*(1.d0+dbe/dkm1)*(1.d0+dalpbe/ * dkm1)/((1.d0+.5d0*(dalpbe+1.d0)/dkm1)*(1.d0+.5d0*(dalpbe * -1.d0)/dkm1)*(1.d0+.5d0*dalpbe/dkm1)**2) 70 continue return end if else if(ipoly.eq.7) then if(dal.le.-1.d0) then iderr=1 return else da(1)=dal+1.d0 db(1)=dgamma(dal+1.d0,iderr) if(iderr.eq.2) db(1)=d1mach(2) if(n.eq.1) return do 80 k=2,n dkm1=dble(k-1) da(k)=2.d0*dkm1+dal+1.d0 db(k)=dkm1*(dkm1+dal) 80 continue return end if else if(ipoly.eq.8) then db(1)=dsqrt(4.d0*datan(1.d0)) if(n.eq.1) return do 90 k=2,n db(k)=.5d0*dble(k-1) 90 continue return else iderr=4 end if end double precision function dlga(dx) double precision dbnum,dbden,dx,d1mach,dc,dp,dy,dt,ds dimension dbnum(8),dbden(8) c c This routine evaluates the logarithm of the gamma function by a c combination of recurrence and asymptotic approximation. c c The entries in the next data statement are the numerators and c denominators, respectively, of the quantities B[16]/(16*15), c B[14]/(14*13),..., B[2]/(2*1), where B[2n] are the Bernoulli c numbers. c data dbnum/-3.617d3,1.d0,-6.91d2,1.d0,-1.d0,1.d0,-1.d0,1.d0/, * dbden/1.224d5,1.56d2,3.6036d5,1.188d3,1.68d3,1.26d3,3.6d2, *1.2d1/ c c The quantity dprec in the next statement is the number of decimal c digits carried in double-precision floating-point arithmetic. c dprec=-alog10(sngl(d1mach(3))) dc=.5d0*dlog(8.d0*datan(1.d0)) dp=1.d0 dy=dx y=sngl(dy) c c The quantity y0 below is the threshold value beyond which asymptotic c evaluation gives sufficient accuracy; see Eq. 6.1.42 in M. Abramowitz c and I.A. Stegun,``Handbook of Mathematical Functions''. The constants c are .12118868... = ln(10)/19 and .05390522... = ln(|B[20]|/190)/19. c y0=exp(.121189*dprec+.053905) 10 if(y.gt.y0) goto 20 dp=dy*dp dy=dy+1.d0 y=sngl(dy) goto 10 20 dt=1.d0/(dy*dy) c c The right-hand side of the next assignment statement is B[18]/(18*17). c ds=4.3867d4/2.44188d5 do 30 i=1,8 ds=dt*ds+dbnum(i)/dbden(i) 30 continue dlga=(dy-.5d0)*dlog(dy)-dy+dc+ds/dy-dlog(dp) return end double precision function dgamma(dx,iderr) c c This evaluates the gamma function for real positive dx, using the c function subroutine dlga. c double precision dx,dlmach,d1mach,dt,dlga dlmach=dlog(d1mach(2)) iderr=0 dt=dlga(dx) if(dt.ge.dlmach) then iderr=2 dgamma=d1mach(2) return else dgamma=dexp(dt) return end if end C-END-OF-FILE ############################## # # # 3. MOMENT-RELATED METHODS # # # ############################## cat < cheb.f c c subroutine cheb(n,a,b,fnu,alpha,beta,s,ierr,s0,s1,s2) c c Given a set of polynomials p(0),p(1),...,p(2*n-1) satisfying c c p(k+1)(x)=(x-a(k))*p(k)(x)-b(k)*p(k-1)(x), c k=0,1,...,2*n-2, c c p(-1)(x)=0, p(0)(x)=1, c c and associated modified moments c c fnu(k)=integral of p(k)(x)*dlambda(x), c k=0,1,...,2*n-1, c c this subroutine uses the modified Chebyshev algorithm (see, e.g., c Section 2.4 of W. Gautschi,``On generating orthogonal polynomials'', c SIAM J. Sci. Statist. Comput. 3, 1982, 289-317) to generate the c recursion coefficients alpha(k),beta(k), k=0,1,...,n-1, for the c polynomials pi(k) orthogonal with respect to the integration c measure dlambda(x), i.e., c c pi(k+1)(x)=(x-alpha(k))*pi(k)(x)-beta(k)*pi(k-1)(x), c k=0,1,...,n-1, c c pi(-1)(x)=0, pi(0)(x)=1. c c Input: n - - the number of recursion coefficients desired c a,b-- arrays of dimension 2*n-1 to be filled with the c values of a(k-1),b(k-1), k=1,2,...,2*n-1 c fnu-- array of dimension 2*n to be filled with the c values of the modified moments fnu(k-1), k=1,2, c ...,2*n c Output: alpha,beta-- arrays containing, respectively, the c recursion coefficients alpha(k-1),beta(k-1), c k=1,2,...,n, where beta(0) is the total mass. c s - - array containing the normalization factors c s(k)=integral [pi(k)(x)]**2 dlambda(x), k=0,1, c 2,...,n-1. c ierr- an error flag, equal to 0 on normal return, c equal to 1 if abs(fnu(0)) is less than the c machine zero, equal to 2 if n is out of range, c equal to -k if s(k), k=0,1,2,...,n-1, is about c to underflow, and equal to +k if it is about to c overflow. c c The arrays s0,s1,s2 are needed for working space. c c On machines with limited exponent range, the occurrence of underflow c [overflow] in the computation of the alpha's and beta's can often c be avoided by multiplying all modified moments by a sufficiently large c [small] scaling factor and dividing the new beta(0) by the same c scaling factor. c c The routine uses the function subroutine r1mach. c dimension a(*),b(*),fnu(*),alpha(n),beta(n),s(n),s0(*),s1(*), *s2(*) c c The arrays a,b are assumed to have dimension 2*n-1, the arrays c fnu,s0,s1,s2 dimension 2*n. c nd=2*n tiny=10.*r1mach(1) huge=.1*r1mach(2) ierr=0 if(abs(fnu(1)).lt.tiny) then ierr=1 return end if if(n.lt.1) then ierr=2 return end if c c Initialization c alpha(1)=a(1)+fnu(2)/fnu(1) beta(1)=fnu(1) if(n.eq.1) return s(1)=fnu(1) do 10 l=1,nd s0(l)=0. s1(l)=fnu(l) 10 continue c c Continuation c do 40 k=2,n lk=nd-k+1 do 20 l=k,lk c c The quantities s2(l) for l > k are auxiliary quantities which may c be zero or may become so small as to underflow, without however c causing any harm. c s2(l)=s1(l+1)-(alpha(k-1)-a(l))*s1(l)-beta(k-1)*s0(l) * +b(l)*s1(l-1) if(l.eq.k) s(k)=s2(k) c c Check impending underflow or overflow c if(abs(s(k)).lt.tiny) then ierr=-(k-1) return else if(abs(s(k)).gt.huge) then ierr=k-1 return end if 20 continue c c Compute the alpha- and beta-coefficient c alpha(k)=a(k)+(s2(k+1)/s2(k))-(s1(k)/s1(k-1)) beta(k)=s2(k)/s1(k-1) do 30 l=k,lk s0(l)=s1(l) s1(l)=s2(l) 30 continue 40 continue return end C-END-OF-FILE cat < dcheb.f c c subroutine dcheb(n,da,db,dnu,dalpha,dbeta,ds,iderr,ds0,ds1,ds2) c c This is a double-precision version of the routine cheb. c double precision da,db,dnu,dalpha,dbeta,ds,ds0,ds1,ds2,dtiny, *d1mach,dhuge dimension da(*),db(*),dnu(*),dalpha(n),dbeta(n),ds(n), *ds0(*),ds1(*),ds2(*) c c The arrays da,db are assumed to have dimension 2*n-1, the arrays c dnu,ds0,ds1,ds2 dimension 2*n. c nd=2*n dtiny=10.d0*d1mach(1) dhuge=.1d0*d1mach(2) iderr=0 if(dabs(dnu(1)).lt.dtiny) then iderr=1 return end if if(n.lt.1) then iderr=2 return end if dalpha(1)=da(1)+dnu(2)/dnu(1) dbeta(1)=dnu(1) if(n.eq.1) return ds(1)=dnu(1) do 10 l=1,nd ds0(l)=0.d0 ds1(l)=dnu(l) 10 continue do 40 k=2,n lk=nd-k+1 do 20 l=k,lk ds2(l)=ds1(l+1)-(dalpha(k-1)-da(l))*ds1(l)-dbeta(k-1)*ds0(l) * +db(l)*ds1(l-1) if(l.eq.k) ds(k)=ds2(k) 20 continue if(dabs(ds(k)).lt.dtiny) then iderr=-(k-1) return else if(dabs(ds(k)).gt.dhuge) then iderr=k-1 return end if dalpha(k)=da(k)+(ds2(k+1)/ds2(k))-(ds1(k)/ds1(k-1)) dbeta(k)=ds2(k)/ds1(k-1) do 30 l=k,lk ds0(l)=ds1(l) ds1(l)=ds2(l) 30 continue 40 continue return end C-END-OF-FILE ###################################################################### # # # 4. STIELTJES, ORTHOGONAL REDUCTION, AND DISCRETIZATION PROCEDURES # # # ###################################################################### cat < sti.f c c subroutine sti(n,ncap,x,w,alpha,beta,ierr,p0,p1,p2) c c This routine applies ``Stieltjes's procedure'' (cf. Section 2.1 of c W. Gautschi,``On generating orthogonal polynomials'', SIAM J. Sci. c Statist. Comput. 3, 1982, 289-317) to generate the recursion c coefficients alpha(k), beta(k) , k=0,1,...,n-1, for the discrete c (monic) orthogonal polynomials associated with the inner product c c (f,g)=sum over k from 1 to ncap of w(k)*f(x(k))*g(x(k)). c c The integer n must be between 1 and ncap, inclusive; otherwise, c there is an error exit with ierr=1. The results are stored in the c arrays alpha, beta; the arrays p0, p1, p2 are working arrays. c c If there is a threat of underflow or overflow in the calculation c of the coefficients alpha(k) and beta(k), the routine exits with c the error flag ierr set equal to -k (in the case of underflow) c or +k (in the case of overflow), where k is the recursion index c for which the problem occurs. The former [latter] can often be avoided c by multiplying all weights w(k) by a sufficiently large [small] c scaling factor prior to entering the routine, and, upon exit, divide c the coefficient beta(0) by the same factor. c c This routine should be used with caution if n is relatively close c to ncap, since there is a distinct possibility of numerical c instability developing. (See W. Gautschi,``Is the recurrence relation c for orthogonal polynomials always stable?'', BIT, 1993, to appear.) c In that case, the routine lancz should be used. c c The routine uses the function subroutine r1mach. c dimension x(ncap),w(ncap),alpha(n),beta(n),p0(ncap),p1(ncap), *p2(ncap) tiny=10.*r1mach(1) huge=.1*r1mach(2) ierr=0 if(n.le.0 .or. n.gt.ncap) then ierr=1 return end if nm1=n-1 c c Compute the first alpha- and beta-coefficient. c sum0=0. sum1=0. do 10 m=1,ncap sum0=sum0+w(m) sum1=sum1+w(m)*x(m) 10 continue alpha(1)=sum1/sum0 beta(1)=sum0 if(n.eq.1) return c c Compute the remaining alpha- and beta-coefficients. c do 20 m=1,ncap p1(m)=0. p2(m)=1. 20 continue do 40 k=1,nm1 sum1=0. sum2=0. do 30 m=1,ncap c c The following statement is designed to avoid an overflow condition c in the computation of p2(m) when the weights w(m) go to zero c faster (and underflow) than the p2(m) grow. c if(w(m).eq.0.) goto 30 p0(m)=p1(m) p1(m)=p2(m) p2(m)=(x(m)-alpha(k))*p1(m)-beta(k)*p0(m) c c Check for impending overflow. c if(abs(p2(m)).gt.huge .or. abs(sum2).gt.huge) then ierr=k return end if t=w(m)*p2(m)*p2(m) sum1=sum1+t sum2=sum2+t*x(m) 30 continue c c Check for impending underflow. c if(abs(sum1).lt.tiny) then ierr=-k return end if alpha(k+1)=sum2/sum1 beta(k+1)=sum1/sum0 sum0=sum1 40 continue return end C-END-OF-FILE cat < dsti.f c c subroutine dsti(n,ncap,dx,dw,dalpha,dbeta,ierr,dp0,dp1,dp2) c c This is a double-precision version of the routine sti. c double precision dx,dw,dalpha,dbeta,dp0,dp1,dp2,dtiny,d1mach, *dhuge,dsum0,dsum1,dsum2,dt dimension dx(ncap),dw(ncap),dalpha(n),dbeta(n),dp0(ncap), *dp1(ncap),dp2(ncap) dtiny=10.d0*d1mach(1) dhuge=.1d0*d1mach(2) ierr=0 if(n.le.0 .or. n.gt.ncap) then ierr=1 return end if nm1=n-1 dsum0=0.d0 dsum1=0.d0 do 10 m=1,ncap dsum0=dsum0+dw(m) dsum1=dsum1+dw(m)*dx(m) 10 continue dalpha(1)=dsum1/dsum0 dbeta(1)=dsum0 if(n.eq.1) return do 20 m=1,ncap dp1(m)=0.d0 dp2(m)=1.d0 20 continue do 40 k=1,nm1 dsum1=0.d0 dsum2=0.d0 do 30 m=1,ncap if(dw(m).eq.0.d0) goto 30 dp0(m)=dp1(m) dp1(m)=dp2(m) dp2(m)=(dx(m)-dalpha(k))*dp1(m)-dbeta(k)*dp0(m) if(dabs(dp2(m)).gt.dhuge .or. dabs(dsum2).gt.dhuge) then ierr=k return end if dt=dw(m)*dp2(m)*dp2(m) dsum1=dsum1+dt dsum2=dsum2+dt*dx(m) 30 continue if(dabs(dsum1).lt.dtiny) then ierr=-k return end if dalpha(k+1)=dsum2/dsum1 dbeta(k+1)=dsum1/dsum0 dsum0=dsum1 40 continue return end C-END-OF-FILE cat < lancz.f c c subroutine lancz(n,ncap,x,w,alpha,beta,ierr,p0,p1) c c This routine carries out the same task as the routine sti, but c uses the more stable Lanczos method. The meaning of the input c and output parameters is the same as in the routine sti. (This c routine is adapted from the routine RKPW in W.B. Gragg and c W.J. Harrod,``The numerically stable reconstruction of Jacobi c matrices from spectral data'', Numer. Math. 44, 1984, 317-335.) c dimension x(ncap),w(ncap),alpha(n),beta(n),p0(ncap),p1(ncap) if(n.le.0 .or. n.gt.ncap) then ierr=1 return else ierr=0 end if do 10 i=1,ncap p0(i)=x(i) p1(i)=0. 10 continue p1(1)=w(1) do 30 i=1,ncap-1 pi=w(i+1) gam=1. sig=0. t=0. xlam=x(i+1) do 20 k=1,i+1 rho=p1(k)+pi tmp=gam*rho tsig=sig if(rho.le.0.) then gam=1. sig=0. else gam=p1(k)/rho sig=pi/rho end if tk=sig*(p0(k)-xlam)-gam*t p0(k)=p0(k)-(tk-t) t=tk if(sig.le.0.) then pi=tsig*p1(k) else pi=(t**2)/sig end if tsig=sig p1(k)=tmp 20 continue 30 continue do 40 k=1,n alpha(k)=p0(k) beta(k)=p1(k) 40 continue return end C-END-OF-FILE cat < dlancz.f c c subroutine dlancz(n,ncap,dx,dw,dalpha,dbeta,ierr,dp0,dp1) c c This is a double-precision version of the routine lancz. c double precision dx(ncap),dw(ncap),dalpha(n),dbeta(n), *dp0(ncap),dp1(ncap),dpi,dgam,dsig,dt,dxlam,drho,dtmp, *dtsig,dtk if(n.le.0 .or. n.gt.ncap) then ierr=1 return else ierr=0 end if do 10 i=1,ncap dp0(i)=dx(i) dp1(i)=0.d0 10 continue dp1(1)=dw(1) do 30 i=1,ncap-1 dpi=dw(i+1) dgam=1.d0 dsig=0.d0 dt=0.d0 dxlam=dx(i+1) do 20 k=1,i+1 drho=dp1(k)+dpi dtmp=dgam*drho dtsig=dsig if(drho.le.0.d0) then dgam=1.d0 dsig=0.d0 else dgam=dp1(k)/drho dsig=dpi/drho end if dtk=dsig*(dp0(k)-dxlam)-dgam*dt dp0(k)=dp0(k)-(dtk-dt) dt=dtk if(dsig.le.0.d0) then dpi=dtsig*dp1(k) else dpi=(dt**2)/dsig end if dtsig=dsig dp1(k)=dtmp 20 continue 30 continue do 40 k=1,n dalpha(k)=dp0(k) dbeta(k)=dp1(k) 40 continue return end C-END-OF-FILE cat < mcdis.f c c subroutine mcdis(n,ncapm,mc,mp,xp,yp,quad,eps,iq,idelta,irout, *finl,finr,endl,endr,xfer,wfer,alpha,beta,ncap,kount,ierr,ie, *be,x,w,xm,wm,p0,p1,p2) c c This is a multiple-component discretization procedure as described in c Section 4.3 of the companion paper. It generates to a relative c accuracy of eps the recursion coefficients alpha(k), beta(k), c k=0,1,...,n-1, for the polynomials orthogonal with respect to a c weight distribution consisting of the sum of mc continuous c components and a discrete component with mp points. The continuous c part of the spectrum is made up of mc weight functions, each c supported on its own interval. These intervals may or may not be c disjoint. The discretization of the inner product on the i-th c interval is furnished either by a user-supplied subroutine quad, c or by the general-purpose subroutine qgp provided in this package, c depending on whether iq is equal, or not equal, to 1, respectively. c The user-supplied routine must have the form quad(n,x,w,i,ierr) and c is assumed to supply the abscissas x(k) and weights w(k), k=1,2, c ...,n, to be used in approximating the i-th inner product c c integral of p(x)*q(x)*wf(x,i)dx c c by the c c sum over k from 1 to n of w(k)*p(x(k))*q(x(k)), c c i=1,2,...,mc. c c The desired recurrence coefficients are then approximated by the c recursion coefficients of the discrete orthogonal polynomials c belonging to the discretized inner product, which in turn are c computed by either the Stieltjes procedure or the Lanczos algorithm c according as irout is equal to, or not equal to 1, respectively. c Two error flags ierr,ie are provided which signal the occurrence c of an error condition in the quadrature process, or in the routine c sti or lancz (whichever is used), respectively. The point spectrum c is given through its abscissas xp and jumps yp. c c If the quadrature routine quad has polynomial degree of exactness c at least id(n) for each i, and if id(n)/n = idelta + O(1/n) as c n goes to infinity, then the procedure is designed to converge after c one iteration, provided idelta is set with the appropriate c integer. Normally, idelta=1 (for interpolatory rules) or idelta=2 c (for Gaussian rules). The default value is idelta=1. c c Input: n - - the number of recursion coefficients desired; c type integer c ncapm - a discretization parameter indicating an upper c limit of the fineness of the discretization; c ncapm=500 will usually be satisfactory; type c integer c mc - - the number of disjoint intervals in the c continuous part of the spectrum; type integer c mp - - the number of points in the discrete part of c the spectrum; type integer. If there is no c point spectrum, set mp=0. c xp - - an array of dimension mp containing the c abscissas of the point spectrum c yp - - an array of dimension mp containing the jumps c of the point spectrum c quad - a subroutine determining the discretization of c the inner product on each component interval, c or a dummy routine if iq is not equal to 1 c (see below) c eps - - the desired relative accuracy of the nonzero c recursion coefficients; type real c iq - - an integer selecting a user-supplied quadrature c routine quad if iq=1 or the ORTHPOL routine c qgp otherwise c idelta - a nonzero integer, typically 1 or 2, inducing c fast convergence in the case of special quadrature c routines c irout - an integer selecting the routine for generating c the recursion coefficients from the discrete c inner product. Specifically, irout=1 selects the c routine sti, whereas any other value selects the c routine lancz c c The logical variables finl,finr, the arrays endl,endr of c dimension mc, and the arrays xfer,wfer of dimension ncapm are c input variables to the subroutine qgp and are used (and hence need c to be properly dimensioned) only if iq is not equal to 1. c c Output: alpha,beta - arrays of dimension n, holding as k-th c element alpha(k-1), beta(k-1), k=1,2,...,n, c respectively c ncap - an integer indicating the fineness of the c discretization that yields convergence within c the eps-tolerance c kount - the number of iterations used c ierr - an error flag, equal to 0 on normal return, c equal to -1 if n is not in the proper range, c equal to i if there is an error condition in c the discretization of the i-th interval, c and equal to ncapm if the discretized c Stieltjes procedure does not converge within the c discretization resolution specified by ncapm c ie - - an error flag inherited from the routine sti c or lancz (whichever is used) c c The array be of dimension n, the arrays x,w of dimension ncapm, c and the arrays xm,wm,p0,p1,p2 of dimension mc*ncapm+mp are used c for working space. The routine calls upon the subroutine sti or c lancz, depending on the choice of irout. c dimension xp(*),yp(*),endl(mc),endr(mc),xfer(ncapm),wfer(ncapm), *alpha(n),beta(n),be(n),x(ncapm),w(ncapm),xm(*),wm(*),p0(*),p1(*), *p2(*) logical finl,finr c c The arrays xp,yp are assumed to have dimension mp if mp > 0, and c the arrays xm,wm,p0,p1,p2 dimension mc*ncapm+mp. c if(idelta.le.0) idelta=1 if(n.lt.1) then ierr=-1 return end if c c Initialization c incap=1 kount=-1 ierr=0 do 10 k=1,n beta(k)=0. 10 continue ncap=(2*n-1)/idelta 20 do 30 k=1,n be(k)=beta(k) 30 continue kount=kount+1 if(kount.gt.1) incap=2**(kount/5)*n ncap=ncap+incap if(ncap.gt.ncapm) then ierr=ncapm return end if c c Discretization of the inner product c mtncap=mc*ncap do 50 i=1,mc im1tn=(i-1)*ncap if(iq.eq.1) then call quad(ncap,x,w,i,ierr) else call qgp(ncap,x,w,i,ierr,mc,finl,finr,endl,endr,xfer, * wfer) end if if(ierr.ne.0) then ierr=i return end if do 40 k=1,ncap xm(im1tn+k)=x(k) wm(im1tn+k)=w(k) 40 continue 50 continue if(mp.ne.0) then do 60 k=1,mp xm(mtncap+k)=xp(k) wm(mtncap+k)=yp(k) 60 continue end if c c Computation of the desired recursion coefficients c if(irout.eq.1) then call sti(n,mtncap+mp,xm,wm,alpha,beta,ie,p0,p1,p2) else call lancz(n,mtncap+mp,xm,wm,alpha,beta,ie,p0,p1) end if c c In the following statement, the absolute value of the beta's is c used to guard against failure in cases where the routine is applied c to variable-sign weight functions and hence the positivity of the c beta's is not guaranteed. c do 70 k=1,n if(abs(beta(k)-be(k)).gt.eps*abs(beta(k))) goto 20 70 continue return end C-END-OF-FILE cat < dmcdis.f c c subroutine dmcdis(n,ncapm,mc,mp,dxp,dyp,dquad,deps,iq,idelta, *irout,finld,finrd,dendl,dendr,dxfer,dwfer,dalpha,dbeta,ncap, *kount,ierrd,ied,dbe,dx,dw,dxm,dwm,dp0,dp1,dp2) c c This is a double-precision version of the routine mcdis. c double precision dxp,dyp,deps,dendl,dendr,dxfer,dwfer,dalpha, *dbeta,dbe,dx,dw,dxm,dwm,dp0,dp1,dp2 dimension dxp(*),dyp(*),dendl(mc),dendr(mc),dxfer(ncapm), *dwfer(ncapm),dalpha(n),dbeta(n),dbe(n),dx(ncapm),dw(ncapm), *dxm(*),dwm(*),dp0(*),dp1(*),dp2(*) logical finld,finrd c c The arrays dxp,dyp are assumed to have dimension mp if mp > 0, c the arrays dxm,dwm,dp0,dp1,dp2 dimension mc*ncapm+mp. c if(idelta.le.0) idelta=1 if(n.lt.1) then ierrd=-1 return end if incap=1 kount=-1 ierr=0 do 10 k=1,n dbeta(k)=0.d0 10 continue ncap=(2*n-1)/idelta 20 do 30 k=1,n dbe(k)=dbeta(k) 30 continue kount=kount+1 if(kount.gt.1) incap=2**(kount/5)*n ncap=ncap+incap if(ncap.gt.ncapm) then ierrd=ncapm return end if mtncap=mc*ncap do 50 i=1,mc im1tn=(i-1)*ncap if(iq.eq.1) then call dquad(ncap,dx,dw,i,ierr) else call dqgp(ncap,dx,dw,i,ierr,mc,finld,finrd,dendl,dendr,dxfer, * dwfer) end if if(ierr.ne.0) then ierrd=i return end if do 40 k=1,ncap dxm(im1tn+k)=dx(k) dwm(im1tn+k)=dw(k) 40 continue 50 continue if(mp.ne.0) then do 60 k=1,mp dxm(mtncap+k)=dxp(k) dwm(mtncap+k)=dyp(k) 60 continue end if if(irout.eq.1) then call dsti(n,mtncap+mp,dxm,dwm,dalpha,dbeta,ied,dp0,dp1,dp2) else call dlancz(n,mtncap+mp,dxm,dwm,dalpha,dbeta,ied,dp0,dp1) end if do 70 k=1,n if(dabs(dbeta(k)-dbe(k)).gt.deps*dabs(dbeta(k))) goto 20 70 continue return end C-END-OF-FILE cat < qgp.f c c subroutine qgp(n,x,w,i,ierr,mc,finl,finr,endl,endr,xfer,wfer) c c This is a general-purpose discretization routine that can be used c as an alternative to the routine quad in the multiple-component c discretization procedure mcdis. It takes no account of the special c nature of the weight function involved and hence may result in slow c convergence of the discretization procedure. This routine, therefore, c should be used only as a last resort, when no better, more natural c discretization can be found. c c It is assumed that there are mc.ge.1 disjoint component intervals. c The discretization is effected by the Fejer quadrature rule, c suitably transformed to the respective interval. An interval that c extends to minus infinity has to be indexed by 1; one that extends c to plus infinity has to be indexed by mc. c c The output variable ierr is given the value 0. Additional input c parameters and working space used by this routine are as follows: c c mc - the number of component intervals; type integer c finl - a logical variable to be set .true. if the c extreme left interval is finite, and .false. c otherwise c finr - a logical variable to be set .true. if the c extreme right interval is finite, and .false. c otherwise c endl - an array of dimension mc containing the left c endpoints of the component intervals; if the c first of these extends to minus infinity, endl(1) c can be set to an arbitrary value c endr - an array of dimension mc containing the right c endpoints of the component intervals; if the c last of these extends to plus infinity, endr(mc) c can be set to an arbitrary value c xfer,wfer-working arrays holding the Fejer nodes and c weights, respectively, for the interval [-1,1]. c c The user has to supply the routine c c function wf(x,i), c c which evaluates the weight function at the point x on the i-th c component interval. The routine also uses the subroutines fejer, c symtr and tr, which are appended. c dimension x(n),w(n),endl(mc),endr(mc),xfer(*),wfer(*) logical finl,finr c c The arrays xfer,wfer are dimensioned in the routine mcdis. c ierr=0 if(i.eq.1) call fejer(n,xfer,wfer) if(i.gt.1 .and. i.lt.mc) goto 60 if(mc.eq.1) then if(finl.and.finr) goto 60 if(finl) goto 20 if(finr) goto 40 do 10 k=1,n call symtr(xfer(k),phi,phi1) x(k)=phi w(k)=wfer(k)*wf(phi,i)*phi1 10 continue return else if((i.eq.1.and.finl).or.(i.eq.mc.and.finr)) goto 60 if(i.eq.1) goto 40 end if 20 do 30 k=1,n call tr(xfer(k),phi,phi1) x(k)=endl(mc)+phi w(k)=wfer(k)*wf(x(k),mc)*phi1 30 continue return 40 do 50 k=1,n call tr(-xfer(k),phi,phi1) x(k)=endr(1)-phi w(k)=wfer(k)*wf(x(k),1)*phi1 50 continue return 60 do 70 k=1,n x(k)=.5*((endr(i)-endl(i))*xfer(k)+endr(i)+endl(i)) w(k)=.5*(endr(i)-endl(i))*wfer(k)*wf(x(k),i) 70 continue return end subroutine symtr(t,phi,phi1) c c This implements a particular transformation x=phi(t) mapping c the t-interval [-1,1] to the x-interval [-oo,oo]. c c input: t c output: phi=phi(t) c phi1=derivative of phi(t) c t2=t*t phi=t/(1.-t2) phi1=(t2+1.)/(t2-1.)**2 return end subroutine tr(t,phi,phi1) c c This implements a particular transformation x=phi(t) mapping c the t-interval [-1,1] to the x-interval [0,oo]. c c input: t c output: phi=phi(t) c phi1=derivative of phi(t) c phi=(1.+t)/(1.-t) phi1=2./(t-1.)**2 return end subroutine fejer(n,x,w) c c This routine generates the n-point Fejer quadrature rule. c c input: n - the number of quadrature nodes c output: x,w - arrays of dimension n holding the quadrature c nodes and weights, respectively; the nodes c are ordered increasingly c dimension x(n),w(n) pi=4.*atan(1.) nh=n/2 np1h=(n+1)/2 fn=real(n) do 10 k=1,nh x(n+1-k)=cos(.5*real(2*k-1)*pi/fn) x(k)=-x(n+1-k) 10 continue if(2*nh.ne.n) x(np1h)=0. do 30 k=1,np1h c1=1. c0=2.*x(k)*x(k)-1. t=2.*c0 sum=c0/3. do 20 m=2,nh c2=c1 c1=c0 c0=t*c1-c2 sum=sum+c0/real(4*m*m-1) 20 continue w(k)=2.*(1.-2.*sum)/fn w(n+1-k)=w(k) 30 continue return end C-END-OF-FILE cat < dqgp.f c c subroutine dqgp(n,dx,dw,i,ierr,mcd,finld,finrd,dendl,dendr, * dxfer,dwfer) c c This is a double-precision version of the routine qgp. The user c has to supply the routine c c double precision function dwf(dx,i), c c which evaluates the weight function in double precision at the c point dx on the i-th component interval. c double precision dx,dw,dendl,dendr,dxfer,dwfer,dphi,dphi1,dwf dimension dx(n),dw(n),dendl(mcd),dendr(mcd),dxfer(*),dwfer(*) logical finld,finrd c c The arrays dxfer,dwfer are dimensioned in the routine dmcdis. c ierr=0 if(i.eq.1) call dfejer(n,dxfer,dwfer) if(i.gt.1 .and. i.lt.mcd) goto 60 if(mcd.eq.1) then if(finld.and.finrd) goto 60 if(finld) goto 20 if(finrd) goto 40 do 10 k=1,n call dsymtr(dxfer(k),dphi,dphi1) dx(k)=dphi dw(k)=dwfer(k)*dwf(dphi,i)*dphi1 10 continue return else if((i.eq.1.and.finld).or.(i.eq.mcd.and.finrd)) goto 60 if(i.eq.1) goto 40 end if 20 do 30 k=1,n call dtr(dxfer(k),dphi,dphi1) dx(k)=dendl(mcd)+dphi dw(k)=dwfer(k)*dwf(dx(k),mcd)*dphi1 30 continue return 40 do 50 k=1,n call dtr(-dxfer(k),dphi,dphi1) dx(k)=dendr(1)-dphi dw(k)=dwfer(k)*dwf(dx(k),1)*dphi1 50 continue return 60 do 70 k=1,n dx(k)=.5d0*((dendr(i)-dendl(i))*dxfer(k)+dendr(i)+dendl(i)) dw(k)=.5d0*(dendr(i)-dendl(i))*dwfer(k)*dwf(dx(k),i) 70 continue return end subroutine dsymtr(dt,dphi,dphi1) c c This is a double-precision version of symtr. c double precision dt,dphi,dphi1,dt2 dt2=dt*dt dphi=dt/(1.-dt2) dphi1=(dt2+1.d0)/(dt2-1.d0)**2 return end subroutine dtr(dt,dphi,dphi1) c c This is a double-precision version of tr. c double precision dt,dphi,dphi1 dphi=(1.d0+dt)/(1.d0-dt) dphi1=2.d0/(dt-1.d0)**2 return end subroutine dfejer(n,dx,dw) c c This is a double-precision version of fejer. c double precision dx,dw,dpi,dn,dc1,dc0,dt,dsum,dc2 dimension dx(n),dw(n) dpi=4.d0*datan(1.d0) nh=n/2 np1h=(n+1)/2 dn=dble(n) do 10 k=1,nh dx(n+1-k)=dcos(.5d0*dble(2*k-1)*dpi/dn) dx(k)=-dx(n+1-k) 10 continue if(2*nh.ne.n) dx(np1h)=0.d0 do 30 k=1,np1h dc1=1.d0 dc0=2.d0*dx(k)*dx(k)-1.d0 dt=2.d0*dc0 dsum=dc0/3.d0 do 20 m=2,nh dc2=dc1 dc1=dc0 dc0=dt*dc1-dc2 dsum=dsum+dc0/dble(4*m*m-1) 20 continue dw(k)=2.d0*(1.d0-2.d0*dsum)/dn dw(n+1-k)=dw(k) 30 continue return end C-END-OF-FILE cat < mccheb.f c c subroutine mccheb(n,ncapm,mc,mp,xp,yp,quad,eps,iq,idelta, *finl,finr,endl,endr,xfer,wfer,a,b,fnu,alpha,beta,ncap,kount, *ierr,be,x,w,xm,wm,s,s0,s1,s2) c c This is a multiple-component discretized modified Chebyshev c algorithm, basically a modified Chebyshev algorithm in which the c modified moments are discretized in the same manner as the inner c product in the discretization procedure mcdis. The input and c output parameters are as in mcdis. In addition, the arrays a,b c must be filled with the recursion coefficients a(k-1),b(k-1), c k=1,2,...,2*n-1, defining the modified moments. The arrays c be,x,w,xm,wm,s,s0,s1,s2 are used for working space. The routine c calls upon the subroutine cheb. The routine exits immediately with c ierr=-1 if n is not in range. c dimension xp(*),yp(*),endl(mc),endr(mc),xfer(ncapm), *wfer(ncapm),a(*),b(*),fnu(*),alpha(n),beta(n),be(n),x(ncapm), *w(ncapm),xm(*),wm(*),s(n),s0(*),s1(*),s2(*) logical finl,finr c c The arrays xp,yp are assumed to have dimension mp if mp > 0, c the arrays a,b dimension 2*n-1, the arrays fnu,s0,s1,s2 dimension c 2*n, and the arrays xm,wm dimension mc*ncapm+mp. c nd=2*n if(idelta.le.0) idelta=1 if(n.lt.1) then ierr=-1 return end if c c Initialization c incap=1 kount=-1 ierr=0 do 10 k=1,n beta(k)=0. 10 continue ncap=(nd-1)/idelta 20 do 30 k=1,n be(k)=beta(k) 30 continue kount=kount+1 if(kount.gt.1) incap=2**(kount/5)*n ncap=ncap+incap if(ncap.gt.ncapm) then ierr=ncapm return end if c c Discretization of the modified moments c mtncap=mc*ncap do 50 i=1,mc im1tn=(i-1)*ncap if(iq.eq.1) then call quad(ncap,x,w,i,ierr) else call qgp(ncap,x,w,i,ierr,mc,finl,finr,endl,endr,xfer,wfer) end if if(ierr.ne.0) then ierr=i return end if do 40 k=1,ncap xm(im1tn+k)=x(k) wm(im1tn+k)=w(k) 40 continue 50 continue if(mp.ne.0) then do 60 k=1,mp xm(mtncap+k)=xp(k) wm(mtncap+k)=yp(k) 60 continue end if mtnpmp=mtncap+mp do 90 k=1,nd km1=k-1 sum=0. do 80 i=1,mtnpmp p1=0. p=1. if(k.gt.1) then do 70 l=1,km1 pm1=p1 p1=p p=(xm(i)-a(l))*p1-b(l)*pm1 70 continue end if sum=sum+wm(i)*p 80 continue fnu(k)=sum 90 continue c c Computation of the desired recursion coefficients c call cheb(n,a,b,fnu,alpha,beta,s,ierr,s0,s1,s2) c c In the following statement, the absolute value of the beta's is c used to guard against failure in cases where the routine is applied c to variable-sign weight functions and hence the positivity of the c beta's is not guaranteed. c do 100 k=1,n if(abs(beta(k)-be(k)).gt.eps*abs(beta(k))) goto 20 100 continue return end C-END-OF-FILE cat < dmcheb.f c c subroutine dmcheb(n,ncapm,mcd,mp,dxp,dyp,dquad,deps,iq, *idelta,finld,finrd,dendl,dendr,dxfer,dwfer,da,db,dnu,dalpha, *dbeta,ncap,kount,ierrd,dbe,dx,dw,dxm,dwm,ds,ds0,ds1,ds2) c c This is a double-precision version of the routine mccheb. c double precision dxp,dyp,deps,dendl,dendr,dxfer,dwfer,da,db, *dnu,dalpha,dbeta,dbe,dx,dw,dxm,dwm,ds,ds0,ds1,ds2,dsum,dp1, *dp,dpm1 dimension dxp(*),dyp(*),dendl(mcd),dendr(mcd),dxfer(ncapm), *dwfer(ncapm),da(*),db(*),dnu(*),dalpha(n),dbeta(n),dbe(n), *dx(ncapm),dw(ncapm),dxm(*),dwm(*),ds(n),ds0(*),ds1(*),ds2(*) logical finld,finrd c c The arrays dxp,dyp are assumed to have dimension mp if mp > 0, c the arrays da,db dimension 2*n-1, the arrays dnu,ds0,ds1,ds2 c dimension 2*n, and the arrays dxm,dwm dimension mc*ncapm+mp. c nd=2*n if(idelta.le.0) idelta=1 if(n.lt.1) then ierrd=-1 return end if incap=1 kount=-1 ierrd=0 do 10 k=1,n dbeta(k)=0.d0 10 continue ncap=(nd-1)/idelta 20 do 30 k=1,n dbe(k)=dbeta(k) 30 continue kount=kount+1 if(kount.gt.1) incap=2**(kount/5)*n ncap=ncap+incap if(ncap.gt.ncapm) then ierrd=ncapm return end if mtncap=mcd*ncap do 50 i=1,mcd im1tn=(i-1)*ncap if(iq.eq.1) then call dquad(ncap,dx,dw,i,ierr) else call dqgp(ncap,dx,dw,i,ierr,mcd,finld,finrd,dendl,dendr, * dxfer,dwfer) end if if(ierr.ne.0) then ierrd=i return end if do 40 k=1,ncap dxm(im1tn+k)=dx(k) dwm(im1tn+k)=dw(k) 40 continue 50 continue if(mp.ne.0) then do 60 k=1,mp dxm(mtncap+k)=dxp(k) dwm(mtncap+k)=dyp(k) 60 continue end if mtnpmp=mtncap+mp do 90 k=1,nd km1=k-1 dsum=0.d0 do 80 i=1,mtnpmp dp1=0.d0 dp=1.d0 if(k.gt.1) then do 70 l=1,km1 dpm1=dp1 dp1=dp dp=(dxm(i)-da(l))*dp1-db(l)*dpm1 70 continue end if dsum=dsum+dwm(i)*dp 80 continue dnu(k)=dsum 90 continue call dcheb(n,da,db,dnu,dalpha,dbeta,ds,ierr,ds0,ds1,ds2) do 100 k=1,n if(dabs(dbeta(k)-dbe(k)).gt.deps*dabs(dbeta(k))) goto 20 100 continue return end C-END-OF-FILE ############################### # # # 5. MODIFICATION ALGORITHMS # # # ############################### cat < chri.f c c subroutine chri(n,iopt,a,b,x,y,hr,hi,alpha,beta,ierr) c c This subroutine implements the Christoffel or generalized Christoffel c theorem. In all cases except iopt=7, it uses nonlinear recurrence c algorithms described in W. Gautschi,``An algorithmic implementation c of the generalized Christoffel theorem'', Numerical Integration c (G. Haemmerlin, ed.), Birkhaeuser, Basel, 1982, pp. 89-106. The case c iopt=7 incorporates a QR step with shift x in the manner of c J. Kautsky and G.H. Golub, ``On the calculation of Jacobi matrices'', c Linear Algebra Appl. 52/53, 1983, 439-455, using the algorithm of c Eq. (67.11) on p. 567 in J.H. Wilkinson,``The Algebraic Eigenvalue c Problem'', Clarendon Press, Oxford, 1965. Given the recursion c coefficients a(k),b(k), k=0,1,...,n, for the (monic) orthogonal c polynomials with respect to some measure dlambda(t), it generates c the recursion coefficients alpha(k),beta(k), k=0,1,...,n-1, for the c measure c c (t-x)dlambda(t) if iopt=1 c [(t-x)**2+y**2]dlambda(t) if iopt=2 c (t**2+y**2)dlambda(t) with if iopt=3 c dlambda(t) and supp(dlambda) c symmetric with respect to c the origin c dlambda(t)/(t-x) if iopt=4 c dlambda(t)/[(t-x)**2+y**2] if iopt=5 c dlambda(t)/(t**2+y**2) with if iopt=6 c dlambda(t) and supp(dlambda) c symmetric with respect to c the origin c [(t-x)**2]dlambda(t) if iopt=7 c c c Input: n - - - the number of recurrence coefficients c desired; type integer c iopt - - an integer selecting the desired weight c distribution c a,b - - arrays of dimension n+1 containing the c recursion coefficients a(k-1),b(k-1),k=1,2, c ...,n+1, of the polynomials orthogonal with c respect to the given measure dlambda(t) c x,y - - real parameters defining the linear and c quadratic factors, or divisors, of dlambda(t) c hr,hi - the real and imaginary part, respectively, of c the integral of dlambda(t)/(z-t), where z=x+iy; c the parameter hr is used only if iopt=4 or c 5, the parameter hi only if iopt=5 or 6 c c Output: alpha,beta - - arrays of dimension n containing the c desired recursion coefficients alpha(k-1), c beta(k-1), k=1,2,...,n c c It is assumed that n is larger than or equal to 2. Otherwise, the c routine exits immediately with the error flag ierr set equal to 1. c If iopt is not between 1 and 7, the routine exits with ierr=2. c c The routine uses the function subroutine r1mach to evaluate the c constant eps, which is used only if iopt=7. c dimension a(*),b(*),alpha(n),beta(n) c c The arrays a,b are assumed to have dimension n+1. c eps=5.*r1mach(3) c c The quantity eps is a constant slightly larger than the machine c precision. c ierr=0 if(n.lt.2) then ierr=1 return end if c c What follows implements Eq. (3.7) of W. Gautschi, op. cit. c if (iopt.eq.1) then e=0. do 10 k=1,n q=a(k)-e-x beta(k)=q*e e=b(k+1)/q alpha(k)=x+q+e 10 continue c c Set the first beta-coefficient as discussed in Section 5.1 of the c companion paper. c beta(1)=b(1)*(a(1)-x) return c c What follows implements Eq. (4.7) of W. Gautschi, op. cit. c else if(iopt.eq.2) then s=x-a(1) t=y eio=0. do 20 k=1,n d=s*s+t*t er=-b(k+1)*s/d ei=b(k+1)*t/d s=x+er-a(k+1) t=y+ei alpha(k)=x+t*er/ei-s*ei/t beta(k)=t*eio*(1.+(er/ei)**2) eio=ei 20 continue c c Set the first beta-coefficient. c beta(1)=b(1)*(b(2)+(a(1)-x)**2+y*y) return c c What follows implements Eq. (4.8) of W. Gautschi, op. cit. c else if(iopt.eq.3) then t=y eio=0. do 30 k=1,n ei=b(k+1)/t t=y+ei alpha(k)=0. beta(k)=t*eio eio=ei 30 continue c c Set the first beta-coefficient. c beta(1)=b(1)*(b(2)+y*y) return c c What follows implements Eqs. (5.1),(5.2) of W. Gautschi, op. cit. c else if(iopt.eq.4) then alpha(1)=x-b(1)/hr beta(1)=-hr q=-b(1)/hr do 40 k=2,n e=a(k-1)-x-q beta(k)=q*e q=b(k)/e alpha(k)=q+e+x 40 continue return c c What follows implements Eq. (5.8) of W. Gautschi, op. cit. c else if(iopt.eq.5) then nm1=n-1 d=hr*hr+hi*hi eroo=a(1)-x+b(1)*hr/d eioo=-b(1)*hi/d-y alpha(1)=x+hr*y/hi beta(1)=-hi/y alpha(2)=x-b(1)*hi*eroo/(d*eioo)+hr*eioo/hi beta(2)=y*eioo*(1.+(hr/hi)**2) if(n.eq.2) return so=b(2)/(eroo**2+eioo**2) ero=a(2)-x-so*eroo eio=so*eioo-y alpha(3)=x+eroo*eio/eioo+so*eioo*ero/eio beta(3)=-b(1)*hi*eio*(1.+(eroo/eioo)**2)/d if(n.eq.3) return do 50 k=3,nm1 s=b(k)/(ero**2+eio**2) er=a(k)-x-s*ero ei=s*eio-y alpha(k+1)=x+ero*ei/eio+s*eio*er/ei beta(k+1)=so*eioo*ei*(1.+(ero/eio)**2) eroo=ero eioo=eio ero=er eio=ei so=s 50 continue return c c What follows implements Eq. (5.9) of W. Gautschi, op. cit. c else if(iopt.eq.6) then nm1=n-1 eoo=-b(1)/hi-y eo=b(2)/eoo-y alpha(1)=0. beta(1)=-hi/y alpha(2)=0. beta(2)=y*eoo if(n.eq.2) return alpha(3)=0. beta(3)=-b(1)*eo/hi if(n.eq.3) return do 60 k=3,nm1 e=b(k)/eo-y beta(k+1)=b(k-1)*e/eoo alpha(k+1)=0. eoo=eo eo=e 60 continue return c c What follows implements a QR step with shift x. c else if(iopt.eq.7) then u=0. c=1. c0=0. do 70 k=1,n gamma=a(k)-x-u cm1=c0 c0=c if(abs(c0).gt.eps) then p2=(gamma**2)/c0 else p2=cm1*b(k) end if if(k.gt.1) beta(k)=s*(p2+b(k+1)) s=b(k+1)/(p2+b(k+1)) c=p2/(p2+b(k+1)) u=s*(gamma+a(k+1)-x) alpha(k)=gamma+u+x 70 continue beta(1)=b(1)*(b(2)+(x-a(1))**2) return else ierr=2 return end if end C-END-OF-FILE cat < dchri.f c c subroutine dchri(n,iopt,da,db,dx,dy,dhr,dhi,dalpha,dbeta,ierr) c c This is a double-precision version of the routine chri. c double precision da,db,dx,dy,dhr,dhi,dalpha,dbeta,deps,d1mach, *de,dq,ds,dt,deio,dd,der,dei,deroo,deioo,dso,dero,deoo,deo,du,dc, *dc0,dgam,dcm1,dp2 dimension da(*),db(*),dalpha(n),dbeta(n) c c The arrays da,db are assumed to have dimension n+1. c deps=5.d0*d1mach(3) ierr=0 if(n.lt.2) then ierr=1 return end if if(iopt.eq.1) then de=0.d0 do 10 k=1,n dq=da(k)-de-dx dbeta(k)=dq*de de=db(k+1)/dq dalpha(k)=dx+dq+de 10 continue dbeta(1)=db(1)*(da(1)-dx) return else if(iopt.eq.2) then ds=dx-da(1) dt=dy deio=0.d0 do 20 k=1,n dd=ds*ds+dt*dt der=-db(k+1)*ds/dd dei=db(k+1)*dt/dd ds=dx+der-da(k+1) dt=dy+dei dalpha(k)=dx+dt*der/dei-ds*dei/dt dbeta(k)=dt*deio*(1.d0+(der/dei)**2) deio=dei 20 continue dbeta(1)=db(1)*(db(2)+(da(1)-dx)**2+dy*dy) return else if(iopt.eq.3) then dt=dy deio=0.d0 do 30 k=1,n dei=db(k+1)/dt dt=dy+dei dalpha(k)=0.d0 dbeta(k)=dt*deio deio=dei 30 continue dbeta(1)=db(1)*(db(2)+dy*dy) return else if(iopt.eq.4) then dalpha(1)=dx-db(1)/dhr dbeta(1)=-dhr dq=-db(1)/dhr do 40 k=2,n de=da(k-1)-dx-dq dbeta(k)=dq*de dq=db(k)/de dalpha(k)=dq+de+dx 40 continue return else if(iopt.eq.5) then nm1=n-1 dd=dhr*dhr+dhi*dhi deroo=da(1)-dx+db(1)*dhr/dd deioo=-db(1)*dhi/dd-dy dalpha(1)=dx+dhr*dy/dhi dbeta(1)=-dhi/dy dalpha(2)=dx-db(1)*dhi*deroo/(dd*deioo)+dhr*deioo/dhi dbeta(2)=dy*deioo*(1.d0+(dhr/dhi)**2) if(n.eq.2) return dso=db(2)/(deroo**2+deioo**2) dero=da(2)-dx-dso*deroo deio=dso*deioo-dy dalpha(3)=dx+deroo*deio/deioo+dso*deioo*dero/deio dbeta(3)=-db(1)*dhi*deio*(1.d0+(deroo/deioo)**2)/dd if(n.eq.3) return do 50 k=3,nm1 ds=db(k)/(dero**2+deio**2) der=da(k)-dx-ds*dero dei=ds*deio-dy dalpha(k+1)=dx+dero*dei/deio+ds*deio*der/dei dbeta(k+1)=dso*deioo*dei*(1.d0+(dero/deio)**2) deroo=dero deioo=deio dero=der deio=dei dso=ds 50 continue return else if(iopt.eq.6) then nm1=n-1 deoo=-db(1)/dhi-dy deo=db(2)/deoo-dy dalpha(1)=0.d0 dbeta(1)=-dhi/dy dalpha(2)=0.d0 dbeta(2)=dy*deoo if(n.eq.2) return dalpha(3)=0.d0 dbeta(3)=-db(1)*deo/dhi if(n.eq.3) return do 60 k=3,nm1 de=db(k)/deo-dy dbeta(k+1)=db(k-1)*de/deoo dalpha(k+1)=0.d0 deoo=deo deo=de 60 continue return else if(iopt.eq.7) then du=0.d0 dc=1.d0 dc0=0.d0 do 70 k=1,n dgam=da(k)-dx-du dcm1=dc0 dc0=dc if(dabs(dc0).gt.deps) then dp2=(dgam**2)/dc0 else dp2=dcm1*db(k) end if if(k.gt.1) dbeta(k)=ds*(dp2+db(k+1)) ds=db(k+1)/(dp2+db(k+1)) dc=dp2/(dp2+db(k+1)) du=ds*(dgam+da(k+1)-dx) dalpha(k)=dgam+du+dx 70 continue dbeta(1)=db(1)*(db(2)+(dx-da(1))**2) return else ierr=2 return end if end C-END-OF-FILE cat < knum.f c c subroutine knum(n,nu0,numax,z,eps,a,b,rho,nu,ierr,rold) c c This routine generates c c rho(k)(z)=integral pi(k)(t)dlambda(t)/(z-t), k=0,1,2,...,n, c c where pi(k)(t) is the (monic) k-th degree orthogonal polynomial c with respect to the measure dlambda(t), and the integral is extended c over the support of dlambda. It is assumed that z is a complex c number outside the smallest interval containing the support of c dlambda. The quantities rho(k)(z) are computed as the first n+1 c members of the minimal solution of the basic three-term recurrence c relation c c y(k+1)(z)=(z-a(k))y(k)(z)-b(k)y(k-1)(z), k=0,1,2,..., c c satisfied by the orthogonal polynomials pi(k)(z). c c Input: n - - the largest integer k for which rho(k) is c desired c nu0 - an estimate of the starting backward recurrence c index; if no better estimate is known, set c nu0 = 3*n/2; for Jacobi, Laguerre and Hermite c weight functions, estimates of nu0 are generated c respectively by the routines nu0jac,nu0lag and c nu0her c numax - an integer larger than n cutting off backward c recursion in case of nonconvergence; if nu0 c exceeds numax, then the routine aborts with the c error flag ierr set equal to nu0 c z - - - the variable in rho(k)(z); type complex c eps - - the relative accuracy to which the rho(k) are c desired c a,b - - arrays of dimension numax to be supplied with the c recurrence coefficients a(k-1), b(k-1), k=1,2,..., c numax. c c Output: rho - - an array of dimension n+1 containing the results c rho(k)=rho(k-1)(z), k=1,2,...,n+1; type complex c nu - - the starting backward recurrence index that yields c convergence c ierr - an error flag equal to zero on normal return, equal c to nu0 if nu0 > numax, and equal to numax in c case of nonconvergence. c c The complex array rold of dimension n+1 is used for working space. c complex z,rho,rold,r dimension a(numax),b(numax),rho(*),rold(*) c c The arrays rho,rold are assumed to have dimension n+1. c ierr=0 np1=n+1 if(nu0.gt.numax) then ierr=nu0 return end if if(nu0.lt.np1) nu0=np1 nu=nu0-5 do 10 k=1,np1 rho(k)=(0.,0.) 10 continue 20 nu=nu+5 if(nu.gt.numax) then ierr=numax goto 60 end if do 30 k=1,np1 rold(k)=rho(k) 30 continue r=(0.,0.) do 40 j=1,nu j1=nu-j+1 r=cmplx(b(j1),0.)/(z-cmplx(a(j1),0.)-r) if(j1.le.np1) rho(j1)=r 40 continue do 50 k=1,np1 if(cabs(rho(k)-rold(k)).gt.eps*cabs(rho(k))) goto 20 50 continue 60 if(n.eq.0) return do 70 k=2,np1 rho(k)=rho(k)*rho(k-1) 70 continue return end C-END-OF-FILE cat < nu0jac.f c c function nu0jac(n,z,eps) c c This is an auxiliary function routine providing a starting backward c recurrence index for the Jacobi measure that can be used in place c of nu0 in the routines knum and dknum. c complex z pi=4.*atan(1.) x=real(z) y=abs(aimag(z)) if(x.lt.1.) then if(x.lt.-1.) angle=.5*(2.*pi+atan(y/(x-1.))+atan(y/(x+1.))) if(x.eq.-1.) angle=.5*(1.5*pi-atan(.5*y)) if(x.gt.-1.) angle=.5*(pi+atan(y/(x-1.))+atan(y/(x+1.))) else if(x.eq.1.) angle=.5*(.5*pi+atan(.5*y)) if(x.gt.1.) angle=.5*(atan(y/(x-1.))+atan(y/(x+1.))) end if x2=x*x y2=y*y r=((x2-y2-1.)**2+4.*x2*y2)**.25 r=sqrt((x+r*cos(angle))**2+(y+r*sin(angle))**2) nu0jac=real(n+1)+.5*alog(1./eps)/alog(r) return end C-END-OF-FILE cat < nu0lag.f c c function nu0lag(n,z,al,eps) c c This is an auxiliary function routine providing a starting backward c recurrence index for the Laguerre measure that can be used in place c of nu0 in the routines knum and dknum. c complex z pi=4.*atan(1.) x=real(z) y=aimag(z) phi=.5*pi if(y.lt.0.) phi=1.5*pi if(x.eq.0.) goto 10 phi=atan(y/x) if(y.gt.0. .and. x.gt.0.) goto 10 phi=phi+pi if(x.lt.0.) goto 10 phi=phi+pi 10 nu0lag=(sqrt(real(n+1)+.5*(al+1.))+alog(1./eps)/(4.*(x*x+ * y*y)**.25*cos(.5*(phi-pi))))**2-.5*(al+1.) return end C-END-OF-FILE cat < nu0her.f c c function nu0her(n,z,eps) c c This is an auxiliary function routine providing a starting backward c recurrence index for the Hermite measure that can be used in place c of nu0 in the routines knum and dknum. c complex z nu0her=2.*(sqrt(.5*real(n+1))+.25*alog(1./eps)/ * abs(aimag(z)))**2 return end C-END-OF-FILE cat < dknum.f c c subroutine dknum(n,nu0,numax,dx,dy,deps,da,db,drhor,drhoi,nu, *ierr,droldr,droldi) c c This is a double-precision version of the routine knum. c double precision dx,dy,deps,da(numax),db(numax),drhor(*), *drhoi(*),droldr(*),droldi(*),drr,dri,dden,dt c c The arrays drhor,drhoi,droldr,droldi are assumed to have c dimension n+1. c ierr=0 np1=n+1 if(nu0.gt.numax) then ierr=nu0 return end if if(nu0.lt.np1) nu0=np1 nu=nu0-5 do 10 k=1,np1 drhor(k)=0.d0 drhoi(k)=0.d0 10 continue 20 nu=nu+5 if(nu.gt.numax) then ierr=numax goto 60 end if do 30 k=1,np1 droldr(k)=drhor(k) droldi(k)=drhoi(k) 30 continue drr=0.d0 dri=0.d0 do 40 j=1,nu j1=nu-j+1 dden=(dx-da(j1)-drr)**2+(dy-dri)**2 drr=db(j1)*(dx-da(j1)-drr)/dden dri=-db(j1)*(dy-dri)/dden if(j1.le.np1) then drhor(j1)=drr drhoi(j1)=dri end if 40 continue do 50 k=1,np1 C Following statement replaced -- authors remark c c if((drhor(k)-droldr(k))**2+(drhoi(k)-droldi(k))**2.gt. c * deps*(drhor(k)**2+drhoi(k)**2)) goto 20 if((drhor(k)-droldr(k))**2+(drhoi(k)-droldi(k))**2.gt. * (deps**2)*(drhor(k)**2+drhoi(k)**2)) goto 20 50 continue 60 if(n.eq.0) return do 70 k=2,np1 dt=drhor(k)*drhor(k-1)-drhoi(k)*drhoi(k-1) drhoi(k)=drhor(k)*drhoi(k-1)+drhoi(k)*drhor(k-1) drhor(k)=dt 70 continue return end C-END-OF-FILE cat < kern.f c c subroutine kern(n,nu0,numax,z,eps,a,b,ker,nu,ierr,rold) c c This routine generates the kernels in the Gauss quadrature remainder c term, namely c c K(k)(z)=rho(k)(z)/pi(k)(z), k=0,1,2,...,n, c c where rho(k) are the output quantities of the routine knum, and c pi(k) the (monic) orthogonal polynomials. The results are returned c in the array ker as ker(k)=K(k-1)(z), k=1,2,...,n+1. All the other c input and output parameters have the same meaning as in the routine c knum. c complex z,ker,rold,p0,p,pm1 dimension a(numax),b(numax),ker(*),rold(*) c c The arrays ker,rold are assumed to have dimension n+1. c call knum(n,nu0,numax,z,eps,a,b,ker,nu,ierr,rold) p0=(0.,0.) p=(1.,0.) do 10 k=1,n pm1=p0 p0=p p=(z-a(k))*p0-b(k)*pm1 ker(k+1)=ker(k+1)/p 10 continue return end C-END-OF-FILE cat < dkern.f c c subroutine dkern(n,nu0,numax,dx,dy,deps,da,db,dkerr,dkeri, * nu,ierr,droldr,droldi) c c This is a double-precision version of the routine kern. c double precision dx,dy,deps,da(numax),db(numax),dkerr(*), * dkeri(*),droldr(*),droldi(*),dp0r,dp0i,dpr,dpi,dpm1r, * dpm1i,dden,dt c c The arrays dkerr,dkeri,droldr,droldi are assumed to have c dimension n+1. c call dknum(n,nu0,numax,dx,dy,deps,da,db,dkerr,dkeri,nu,ierr, * droldr,droldi) if(ierr.ne.0) return dp0r=0.d0 dp0i=0.d0 dpr=1.d0 dpi=0.d0 do 10 k=1,n dpm1r=dp0r dpm1i=dp0i dp0r=dpr dp0i=dpi dpr=(dx-da(k))*dp0r-dy*dp0i-db(k)*dpm1r dpi=(dx-da(k))*dp0i+dy*dp0r-db(k)*dpm1i dden=dpr**2+dpi**2 dt=(dkerr(k+1)*dpr+dkeri(k+1)*dpi)/dden dkeri(k+1)=(dkeri(k+1)*dpr-dkerr(k+1)*dpi)/dden dkerr(k+1)=dt 10 continue return end C-END-OF-FILE cat < gchri.f c c subroutine gchri(n,iopt,nu0,numax,eps,a,b,x,y,alpha,beta,nu, * ierr,ierrc,fnu,rho,rold,s,s0,s1,s2) c c This routine implements the generalized Christoffel theorem, using c the method of modified moments (cf. Section 4 of W. Gautschi, c ``Minimal solutions of three-term recurrence relations and orthogonal c polynomials'', Math. Comp. 36, 1981, 547-554). Given the recursion c coefficients a(k), b(k), k=0,1,...n, for the (monic) orthogonal c polynomials with respect to some measure dlambda(t), it generates c the recursion coefficients alpha(k), beta(k), k=0,1,2,...,n-1 for c the measure c c dlambda(t)/(t-x) if iopt=1 c dlambda(t)/{(t-x)**2+y**2} if iopt=2 c c Input: n - - the number of recurrence coefficients desired; c type integer c iopt - an integer selecting the desired weight distribution c nu0 - an integer estimating the starting backward c recurrence index; in the absence of any better c choice, take nu0 = 3*n c numax - an integer controlling termination of backward c recursion in case of nonconvergence; a conservative c choice is numax = 500 c eps - - a relative error tolerance; type real c a,b - - arrays of dimension numax to be supplied with the c recursion coefficients a(k)=alpha(k-1),b(k)=beta(k), c k=1,2,...,numax, for the measure dlambda c x,y - - real parameters defining the linear and quadratic c divisors of dlambda c c Output: alpha,beta - arrays of dimension n containing the desired c recursion coefficients alpha(k-1), beta(k-1), k=1, c 2,...,n c nu - - the backward recurrence index yielding convergence; c in case of nonconvergence, nu will have the value c numax c ierr - an error flag, where c ierr=0 on normal return c ierr=1 if iopt is neither 1 nor 2 c ierr=nu0 if nu0 > numax c ierr=numax if the backward recurrence algorithm does c not converge c ierr=-1 if n is not in range c ierrc - an error flag inherited from the routine cheb c c The arrays fnu,s,s0,s1,s2 are working space. The routine calls c upon the routines knum and cheb. c complex rho,rold,z dimension a(numax),b(numax),alpha(n),beta(n),fnu(*),rho(*), *rold(*),s(n),s0(*),s1(*),s2(*) c c The arrays fnu,rho,rold,s0,s1,s2 are assumed to have dimension 2*n. c if(n.lt.1) then ierr=-1 return end if ierr=0 nd=2*n ndm1=nd-1 c c Linear divisor c if(iopt.eq.1) then c c Generate the modified moments of dlambda. c z=cmplx(x,0.) call knum(ndm1,nu0,numax,z,eps,a,b,rho,nu,ierr,rold) do 10 k=1,nd fnu(k)=-real(rho(k)) 10 continue c c Compute the desired recursion coefficients by means of the modified c Chebyshev algorithm. c call cheb(n,a,b,fnu,alpha,beta,s,ierrc,s0,s1,s2) return c c Quadratic divisor c else if(iopt.eq.2) then c c Generate the modified moments of dlambda. c y=abs(y) z=cmplx(x,y) call knum(ndm1,nu0,numax,z,eps,a,b,rho,nu,ierr,rold) do 20 k=1,nd fnu(k)=-aimag(rho(k))/y 20 continue c c Compute the desired recursion coefficients by means of the modified c Chebyshev algorithm. c call cheb(n,a,b,fnu,alpha,beta,s,ierrc,s0,s1,s2) return else ierr=1 return end if end C-END-OF-FILE cat < dgchri.f c c subroutine dgchri(n,iopt,nu0,numax,deps,da,db,dx,dy,dalpha,dbeta, *nu,ierr,ierrc,dnu,drhor,drhoi,droldr,droldi,ds,ds0,ds1,ds2) c c This is a double-precision version of the routine gchri. c double precision deps,da(numax),db(numax),dx,dy,dalpha(n), *dbeta(n),dnu(*),drhor(*),drhoi(*),droldr(*),droldi(*), *ds(n),ds0(*),ds1(*),ds2(*) c c The arrays dnu,drhor,drhoi,droldr,droldi,ds0,ds1,ds2 are assumed c to have dimension 2*n. c if(n.lt.1) then ierr=-1 return end if ierr=0 nd=2*n ndm1=nd-1 if(iopt.eq.1) then call dknum(ndm1,nu0,numax,dx,dy,deps,da,db,drhor,drhoi,nu, * ierr,droldr,droldi) do 10 k=1,nd dnu(k)=-drhor(k) 10 continue call dcheb(n,da,db,dnu,dalpha,dbeta,ds,ierrc,ds0,ds1,ds2) return else if(iopt.eq.2) then dy=dabs(dy) call dknum(ndm1,nu0,numax,dx,dy,deps,da,db,drhor,drhoi,nu, * ierr,droldr,droldi) do 20 k=1,nd dnu(k)=-drhoi(k)/dy 20 continue call dcheb(n,da,db,dnu,dalpha,dbeta,ds,ierrc,ds0,ds1,ds2) return else ierr=1 return end if end C-END-OF-FILE ################################### # # # 6. GAUSS-TYPE QUADRATURE RULES # # # ################################### cat < gauss.f c c subroutine gauss(n,alpha,beta,eps,zero,weight,ierr,e) c c Given n and a measure dlambda, this routine generates the n-point c Gaussian quadrature formula c c integral over supp(dlambda) of f(x)dlambda(x) c c = sum from k=1 to k=n of w(k)f(x(k)) + R(n;f). c c The nodes are returned as zero(k)=x(k) and the weights as c weight(k)=w(k), k=1,2,...,n. The user has to supply the recursion c coefficients alpha(k), beta(k), k=0,1,2,...,n-1, for the measure c dlambda. The routine computes the nodes as eigenvalues, and the c weights in term of the first component of the respective normalized c eigenvectors of the n-th order Jacobi matrix associated with dlambda. c It uses a translation and adaptation of the algol procedure imtql2, c Numer. Math. 12, 1968, 377-383, by Martin and Wilkinson, as modified c by Dubrulle, Numer. Math. 15, 1970, 450. See also Handbook for c Autom. Comput., vol. 2 - Linear Algebra, pp.241-248, and the eispack c routine imtql2. c c Input: n - - the number of points in the Gaussian quadrature c formula; type integer c alpha,beta - - arrays of dimension n to be filled c with the values of alpha(k-1), beta(k-1), k=1,2, c ...,n c eps - the relative accuracy desired in the nodes c and weights c c Output: zero- array of dimension n containing the Gaussian c nodes (in increasing order) zero(k)=x(k), k=1,2, c ...,n c weight - array of dimension n containing the c Gaussian weights weight(k)=w(k), k=1,2,...,n c ierr- an error flag equal to 0 on normal return, c equal to i if the QR algorithm does not c converge within 30 iterations on evaluating the c i-th eigenvalue, equal to -1 if n is not in c range, and equal to -2 if one of the beta's is c negative. c c The array e is needed for working space. c dimension alpha(n),beta(n),zero(n),weight(n),e(n) if(n.lt.1) then ierr=-1 return end if ierr=0 zero(1)=alpha(1) if(beta(1).lt.0.) then ierr=-2 return end if weight(1)=beta(1) if (n.eq.1) return weight(1)=1. e(n)=0. do 100 k=2,n zero(k)=alpha(k) if(beta(k).lt.0.) then ierr=-2 return end if e(k-1)=sqrt(beta(k)) weight(k)=0. 100 continue do 240 l=1,n j=0 c c Look for a small subdiagonal element. c 105 do 110 m=l,n if(m.eq.n) goto 120 if(abs(e(m)).le.eps*(abs(zero(m))+abs(zero(m+1)))) goto 120 110 continue 120 p=zero(l) if(m.eq.l) goto 240 if(j.eq.30) goto 400 j=j+1 c c Form shift. c g=(zero(l+1)-p)/(2.*e(l)) r=sqrt(g*g+1.) g=zero(m)-p+e(l)/(g+sign(r,g)) s=1. c=1. p=0. mml=m-l c c For i=m-1 step -1 until l do ... c do 200 ii=1,mml i=m-ii f=s*e(i) b=c*e(i) if(abs(f).lt.abs(g)) goto 150 c=g/f r=sqrt(c*c+1.) e(i+1)=f*r s=1./r c=c*s goto 160 150 s=f/g r=sqrt(s*s+1.) e(i+1)=g*r c=1./r s=s*c 160 g=zero(i+1)-p r=(zero(i)-g)*s +2.*c*b p=s*r zero(i+1)=g+p g=c*r-b c c Form first component of vector. c f=weight(i+1) weight(i+1)=s*weight(i)+c*f weight(i)=c*weight(i)-s*f 200 continue zero(l)=zero(l)-p e(l)=g e(m)=0. goto 105 240 continue c c Order eigenvalues and eigenvectors. c do 300 ii=2,n i=ii-1 k=i p=zero(i) do 260 j=ii,n if(zero(j).ge.p) goto 260 k=j p=zero(j) 260 continue if(k.eq.i) goto 300 zero(k)=zero(i) zero(i)=p p=weight(i) weight(i)=weight(k) weight(k)=p 300 continue do 310 k=1,n weight(k)=beta(1)*weight(k)*weight(k) 310 continue return c c Set error - no convergence to an eigenvalue after 30 iterations. c 400 ierr=l return end C-END-OF-FILE cat < dgauss.f c c subroutine dgauss(n,dalpha,dbeta,deps,dzero,dweigh,ierr,de) c c This is a double-precision version of the routine gauss. c double precision dalpha,dbeta,deps,dzero,dweigh,de,dp,dg,dr, *ds,dc,df,db dimension dalpha(n),dbeta(n),dzero(n),dweigh(n),de(n) if(n.lt.1) then ierr=-1 return end if ierr=0 dzero(1)=dalpha(1) if(dbeta(1).lt.0.d0) then ierr=-2 return end if dweigh(1)=dbeta(1) if (n.eq.1) return dweigh(1)=1.d0 de(n)=0.d0 do 100 k=2,n dzero(k)=dalpha(k) if(dbeta(k).lt.0.d0) then ierr=-2 return end if de(k-1)=dsqrt(dbeta(k)) dweigh(k)=0.d0 100 continue do 240 l=1,n j=0 105 do 110 m=l,n if(m.eq.n) goto 120 if(dabs(de(m)).le.deps*(dabs(dzero(m))+dabs(dzero(m+1)))) * goto 120 110 continue 120 dp=dzero(l) if(m.eq.l) goto 240 if(j.eq.30) goto 400 j=j+1 dg=(dzero(l+1)-dp)/(2.d0*de(l)) dr=dsqrt(dg*dg+1.d0) dg=dzero(m)-dp+de(l)/(dg+dsign(dr,dg)) ds=1.d0 dc=1.d0 dp=0.d0 mml=m-l do 200 ii=1,mml i=m-ii df=ds*de(i) db=dc*de(i) if(dabs(df).lt.dabs(dg)) goto 150 dc=dg/df dr=dsqrt(dc*dc+1.d0) de(i+1)=df*dr ds=1.d0/dr dc=dc*ds goto 160 150 ds=df/dg dr=dsqrt(ds*ds+1.d0) de(i+1)=dg*dr dc=1.d0/dr ds=ds*dc 160 dg=dzero(i+1)-dp dr=(dzero(i)-dg)*ds+2.d0*dc*db dp=ds*dr dzero(i+1)=dg+dp dg=dc*dr-db df=dweigh(i+1) dweigh(i+1)=ds*dweigh(i)+dc*df dweigh(i)=dc*dweigh(i)-ds*df 200 continue dzero(l)=dzero(l)-dp de(l)=dg de(m)=0.d0 goto 105 240 continue do 300 ii=2,n i=ii-1 k=i dp=dzero(i) do 260 j=ii,n if(dzero(j).ge.dp) goto 260 k=j dp=dzero(j) 260 continue if(k.eq.i) goto 300 dzero(k)=dzero(i) dzero(i)=dp dp=dweigh(i) dweigh(i)=dweigh(k) dweigh(k)=dp 300 continue do 310 k=1,n dweigh(k)=dbeta(1)*dweigh(k)*dweigh(k) 310 continue return 400 ierr=l return end C-END-OF-FILE cat < radau.f c c subroutine radau(n,alpha,beta,end,zero,weight,ierr,e,a,b) c c Given n and a measure dlambda, this routine generates the c (n+1)-point Gauss-Radau quadrature formula c c integral over supp(dlambda) of f(t)dlambda(t) c c = w(0)f(x(0)) + sum from k=1 to k=n of w(k)f(x(k)) + R(n;f). c c The nodes are returned as zero(k)=x(k), the weights as weight(k) c =w(k), k=0,1,2,...,n. The user has to supply the recursion c coefficients alpha(k), beta(k), k=0,1,2,...,n, for the measure c dlambda. The nodes and weights are computed as eigenvalues and c in terms of the first component of the respective normalized c eigenvectors of a slightly modified Jacobi matrix of order n+1. c To do this, the routine calls upon the subroutine gauss. It also c uses the function subroutine r1mach. c c Input: n - - the number of interior points in the Gauss-Radau c formula; type integer c alpha,beta - arrays of dimension n+1 to be supplied with c the recursion coefficients alpha(k-1), beta(k-1), c k=1,2,...,n+1; the coefficient alpha(n+1) is not c used by the routine c end - the prescribed endpoint x(0) of the Gauss-Radau c formula; type real c c Output: zero - array of dimension n+1 containing the nodes (in c increasing order) zero(k)=x(k), k=0,1,2,...,n c weight-array of dimension n+1 containing the weights c weight(k)=w(k), k=0,1,2,...,n c ierr - an error flag inherited from the routine gauss c c The arrays e,a,b are needed for working space. c dimension alpha(*),beta(*),zero(*),weight(*),e(*),a(*),b(*) c c The arrays alpha,beta,zero,weight,e,a,b are assumed to have c dimension n+1. c epsma=r1mach(3) c c epsma is the machine single precision. c np1=n+1 do 10 k=1,np1 a(k)=alpha(k) b(k)=beta(k) 10 continue p0=0. p1=1. do 20 k=1,n pm1=p0 p0=p1 p1=(end-a(k))*p0-b(k)*pm1 20 continue a(np1)=end-b(np1)*p0/p1 call gauss(np1,a,b,epsma,zero,weight,ierr,e) return end C-END-OF-FILE cat < dradau.f c c subroutine dradau(n,dalpha,dbeta,dend,dzero,dweigh,ierr,de, *da,db) c c This is a double-precision version of the routine radau. c double precision dend,depsma,dp0,dp1,dpm1,dalpha(*),dbeta(*), *dzero(*),dweigh(*),de(*),da(*),db(*),d1mach c c The arrays dalpha,dbeta,dzero,dweigh,de,da,db are assumed to have c dimension n+1. c depsma=d1mach(3) c c depsma is the machine double precision. c np1=n+1 do 10 k=1,np1 da(k)=dalpha(k) db(k)=dbeta(k) 10 continue dp0=0.d0 dp1=1.d0 do 20 k=1,n dpm1=dp0 dp0=dp1 dp1=(dend-da(k))*dp0-db(k)*dpm1 20 continue da(np1)=dend-db(np1)*dp0/dp1 call dgauss(np1,da,db,depsma,dzero,dweigh,ierr,de) return end C-END-OF-FILE cat < lob.f c c subroutine lob(n,alpha,beta,aleft,right,zero,weight,ierr,e,a,b) c c Given n and a measure dlambda, this routine generates the c (n+2)-point Gauss-Lobatto quadrature formula c c integral over supp(dlambda) of f(x)dlambda(x) c c = w(0)f(x(0)) + sum from k=1 to k=n of w(k)f(x(k)) c c + w(n+1)f(x(n+1)) + R(n;f). c c The nodes are returned as zero(k)=x(k), the weights as weight(k) c =w(k), k=0,1,...,n,n+1. The user has to supply the recursion c coefficients alpha(k), beta(k), k=0,1,...,n,n+1, for the measure c dlambda. The nodes and weights are computed in terms of the c eigenvalues and first component of the normalized eigenvectors of c a slightly modified Jacobi matrix of order n+2. The routine calls c upon the subroutine gauss and the function subroutine r1mach. c c Input: n - - the number of interior points in the Gauss-Lobatto c formula; type integer c alpha,beta - arrays of dimension n+2 to be supplied with c the recursion coefficients alpha(k-1), beta(k-1), c k=1,2,...,n+2, of the underlying measure; the c routine does not use alpha(n+2), beta(n+2) c aleft,right - the prescribed left and right endpoints c x(0) and x(n+1) of the Gauss-Lobatto formula c c Output: zero - an array of dimension n+2 containing the nodes (in c increasing order) zero(k)=x(k), k=0,1,...,n,n+1 c weight-an array of dimension n+2 containing the weights c weight(k)=w(k), k=0,1,...,n,n+1 c ierr - an error flag inherited from the routine gauss c c The arrays e,a,b are needed for working space. c dimension alpha(*),beta(*),zero(*),weight(*),e(*),a(*),b(*) c c The arrays alpha,beta,zero,weight,e,a,b are assumed to have c dimension n+2. c epsma=r1mach(3) c c epsma is the machine single precision. c np1=n+1 np2=n+2 do 10 k=1,np2 a(k)=alpha(k) b(k)=beta(k) 10 continue p0l=0. p0r=0. p1l=1. p1r=1. do 20 k=1,np1 pm1l=p0l p0l=p1l pm1r=p0r p0r=p1r p1l=(aleft-a(k))*p0l-b(k)*pm1l p1r=(right-a(k))*p0r-b(k)*pm1r 20 continue det=p1l*p0r-p1r*p0l a(np2)=(aleft*p1l*p0r-right*p1r*p0l)/det b(np2)=(right-aleft)*p1l*p1r/det call gauss(np2,a,b,epsma,zero,weight,ierr,e) return end C-END-OF-FILE cat < dlob.f c c subroutine dlob(n,dalpha,dbeta,dleft,dright,dzero,dweigh, *ierr,de,da,db) c c This is a double-precision version of the routine lob. c double precision dleft,dright,depsma,dp0l,dp0r,dp1l,dp1r,dpm1l, *dpm1r,ddet,dalpha(*),dbeta(*),dzero(*),dweigh(*),de(*),da(*), *db(*),d1mach c c The arrays dalpha,dbeta,dzero,dweigh,de,da,db are assumed to have c dimension n+2. c depsma=d1mach(3) c c depsma is the machine double precision. c np1=n+1 np2=n+2 do 10 k=1,np2 da(k)=dalpha(k) db(k)=dbeta(k) 10 continue dp0l=0.d0 dp0r=0.d0 dp1l=1.d0 dp1r=1.d0 do 20 k=1,np1 dpm1l=dp0l dp0l=dp1l dpm1r=dp0r dp0r=dp1r dp1l=(dleft-da(k))*dp0l-db(k)*dpm1l dp1r=(dright-da(k))*dp0r-db(k)*dpm1r 20 continue ddet=dp1l*dp0r-dp1r*dp0l da(np2)=(dleft*dp1l*dp0r-dright*dp1r*dp0l)/ddet db(np2)=(dright-dleft)*dp1l*dp1r/ddet call dgauss(np2,da,db,depsma,dzero,dweigh,ierr,de) return end C-END-OF-FILE