! !======================================================================= ! MODULE BELL ! ! This module defines Bell numbers ! USE ACCURACY_REAL ! IMPLICIT NONE ! REAL (WP), DIMENSION(0:20), PARAMETER :: BL = (/ 1.00000000000000000000000000E0_WP, & 1.00000000000000000000000000E0_WP, & 2.00000000000000000000000000E0_WP, & 5.00000000000000000000000000E0_WP, & 15.00000000000000000000000000E0_WP, & 52.00000000000000000000000000E0_WP, & 203.00000000000000000000000000E0_WP, & 877.00000000000000000000000000E0_WP, & 4140.00000000000000000000000000E0_WP, & 21147.00000000000000000000000000E0_WP, & 115975.00000000000000000000000000E0_WP, & 678570.00000000000000000000000000E0_WP, & 4213597.00000000000000000000000000E0_WP, & 27644437.00000000000000000000000000E0_WP, & 190899322.00000000000000000000000000E0_WP, & 1382958545.00000000000000000000000000E0_WP, & 10480142147.00000000000000000000000000E0_WP, & 82864869804.00000000000000000000000000E0_WP, & 682076806159.00000000000000000000000000E0_WP, & 5832742205057.00000000000000000000000000E0_WP, & 51724158235372.00000000000000000000000000E0_WP /) ! END MODULE BELL ! !======================================================================= ! MODULE BERNOUILLI ! ! This module defines Bernouilli numbers ! USE ACCURACY_REAL ! IMPLICIT NONE ! REAL (WP), DIMENSION(0:20), PARAMETER :: BN = (/ 1.00000000000000000000000000E0_WP, & ! 1 -0.50000000000000000000000000E0_WP, & ! -1/2 0.16666666666666666666666667E0_WP, & ! 1/6 0.00000000000000000000000000E0_WP, & ! 0 -0.03333333333333333333333333E0_WP, & ! -1/30 0.00000000000000000000000000E0_WP, & ! 0 0.02380952380952380952380952E0_WP, & ! 1/42 0.00000000000000000000000000E0_WP, & ! 0 -0.03333333333333333333333333E0_WP, & ! -1/30 0.00000000000000000000000000E0_WP, & ! 0 0.07575757575757575757575758E0_WP, & ! 5/66 0.00000000000000000000000000E0_WP, & ! 0 -0.25311355311355311355311355E0_WP, & ! -691/2730 0.00000000000000000000000000E0_WP, & ! 0 1.16666666666666666666666667E0_WP, & ! 7/6 0.00000000000000000000000000E0_WP, & ! 0 -7.09215686274509803921568627E0_WP, & ! -3617/510 0.00000000000000000000000000E0_WP, & ! 0 54.97117794486215538847117794E0_WP, & ! 43867/798 0.00000000000000000000000000E0_WP, & ! 0 -529.12424242424242424242424242E0_WP /) ! -174611/330 ! END MODULE BERNOUILLI ! !======================================================================= ! MODULE BINOMIAL ! ! This module defines the values of the binomial coefficients ! USE ACCURACY_REAL ! CONTAINS ! !======================================================================= ! FUNCTION C(N,K) ! k n! ! This function computes the binomial coefficients C = ( n ) = ----------- ! n ( k ) k! (n-k)! ! ! Input parameters: ! ! * N,K : input integer numbers ! ! Output variables : ! ! * C : binomial coefficient C(n,k) ! ! ! Author : D. Sébilleau ! ! Last modified : 20 Sep 2021 ! ! IMPLICIT NONE ! REAL (WP) :: C REAL (WP) :: S(0:10,0:10) ! INTEGER :: N,K INTEGER :: I,J ! ! Initialization ! DO I=0,10 ! DO J=0,10 ! S(I,J)=0.0E0_WP ! END DO ! END DO ! ! ! Particular values ! DO I=0,10 ! S(I,0)=1.0E0_WP ! S(I,1)=DFLOAT(I) ! IF(I > 0) THEN ! S(I,I-1)=DFLOAT(I) ! END IF ! S(I,I)=1.0E0_WP ! END DO ! S(4,2)=6.0E0_WP ! ! S(5,2)=10.0E0_WP ! S(5,3)=10.0E0_WP ! ! S(6,2)=15.0E0_WP ! S(6,3)=20.0E0_WP ! S(6,4)=15.0E0_WP ! ! S(7,2)=21.0E0_WP ! S(7,3)=35.0E0_WP ! S(7,4)=35.0E0_WP ! S(7,5)=21.0E0_WP ! ! S(8,2)=28.0E0_WP ! S(8,3)=56.0E0_WP ! S(8,4)=70.0E0_WP ! S(8,5)=56.0E0_WP ! S(8,6)=28.0E0_WP ! ! S(9,2)= 36.0E0_WP ! S(9,3)= 84.0E0_WP ! S(9,4)=126.0E0_WP ! S(9,5)=126.0E0_WP ! S(9,6)= 84.0E0_WP ! S(9,7)= 36.0E0_WP ! ! S(10,2)= 45.0E0_WP ! S(10,3)=120.0E0_WP ! S(10,4)=210.0E0_WP ! S(10,5)=252.0E0_WP ! S(10,6)=210.0E0_WP ! S(10,7)=120.0E0_WP ! S(10,8)= 45.0E0_WP ! ! IF(K <= N) THEN ! C=S(N,K) ! ELSE ! C=0.0E0_WP ! END IF ! ! END FUNCTION C ! END MODULE BINOMIAL ! !======================================================================= ! MODULE CUBE_ROOTS ! ! This module defines standard cube roots ! USE ACCURACY_REAL ! IMPLICIT NONE ! REAL (WP), PARAMETER :: CUB2 = 1.25992104989487316476721061E0_WP ! cube root of 2 REAL (WP), PARAMETER :: CUB3 = 1.44224957030740838232163831E0_WP ! cube root of 3 REAL (WP), PARAMETER :: CUB4 = 1.58740105196819947475170564E0_WP ! cube root of 4 REAL (WP), PARAMETER :: CUB5 = 1.70997594667669698935310887E0_WP ! cube root of 5 REAL (WP), PARAMETER :: CUB6 = 1.81712059283213965889121176E0_WP ! cube root of 6 REAL (WP), PARAMETER :: CUB7 = 1.91293118277238910119911684E0_WP ! cube root of 7 ! END MODULE CUBE_ROOTS ! !======================================================================= ! MODULE DIRICHLET ! ! This module defines the Dirichlet beta function ! USE ACCURACY_REAL ! IMPLICIT NONE ! REAL (WP), DIMENSION(0:20), PARAMETER :: DB = (/ 0.50000000000000000000000000E0_WP, & ! 1/2 0.78539816339744830961566085E0_WP, & ! pi/4 0.91596559417721901505460351E0_WP, & ! Catalan's constant 0.96894614625936938048363485E0_WP, & ! pi^2 /32 0.98894455174110533610842263E0_WP, & ! 0.99615782807708806400631937E0_WP, & ! 5 pi^2 / 1536 0.99868522221843813544160079E0_WP, & ! 0.99955450789053990949634655E0_WP, & ! 61 pi^7 / 184320 0.99984999024682965633806706E0_WP, & ! 0.99994968418722008982135887E0_WP, & ! 277 pi^9 / 8257536 0.99998316402619687740554073E0_WP, & ! 0.99999437497382369916918245E0_WP, & ! 50521 pi^11 / 14863564800 0.99999812235058788220654297E0_WP, & ! 0.99999937358377184111280361E0_WP, & ! 540553 pi^13 / 1569592442880 0.99999979108724873385223325E0_WP, & ! 0.99999993034084262438716069E0_WP, & ! 199360981 pi^15 / 5713316492083200 0.99999997677595090321057729E0_WP, & ! 0.99999999225778210428842451E0_WP, & ! 0.99999999741908674468308413E0_WP, & ! 0.99999999913966074455903291E0_WP, & ! 0.99999999971321327422902900E0_WP /) ! ! END MODULE DIRICHLET ! !======================================================================= ! MODULE EULER_CONST ! ! This module defines the Euler contants ! USE ACCURACY_REAL ! IMPLICIT NONE ! REAL (WP), PARAMETER :: EULER = 2.71828182845904523536028747E0_WP ! Euler constant e REAL (WP), PARAMETER :: EUMAS = 0.57721566490153286060651209E0_WP ! Euler-Mascheroni gamma ! END MODULE EULER_CONST ! !======================================================================= ! MODULE EULER_NUMB ! ! This module defines the Euler numbers ! USE ACCURACY_REAL ! IMPLICIT NONE ! REAL (WP), DIMENSION(0:20), PARAMETER :: EN = (/ 1.00000000000000000000000000E0_WP, & 0.00000000000000000000000000E0_WP, & -1.00000000000000000000000000E0_WP, & 0.00000000000000000000000000E0_WP, & 5.00000000000000000000000000E0_WP, & 0.00000000000000000000000000E0_WP, & -61.00000000000000000000000000E0_WP, & 0.00000000000000000000000000E0_WP, & 1385.00000000000000000000000000E0_WP, & 0.00000000000000000000000000E0_WP, & -50521.00000000000000000000000000E0_WP, & 0.00000000000000000000000000E0_WP, & 2702765.00000000000000000000000000E0_WP, & 0.00000000000000000000000000E0_WP, & -199360981.00000000000000000000000000E0_WP, & 0.00000000000000000000000000E0_WP, & 19391512145.00000000000000000000000000E0_WP, & 0.00000000000000000000000000E0_WP, & -2404879675145.00000000000000000000000000E0_WP, & 0.00000000000000000000000000E0_WP, & 370371188237525.00000000000000000000000000E0_WP /) ! END MODULE EULER_NUMB ! !======================================================================= ! MODULE FIBONACCI ! ! This module defines the Fibonacci numbers ! USE ACCURACY_REAL ! IMPLICIT NONE ! REAL (WP), DIMENSION(0:20), PARAMETER :: FN = (/ 0.00000000000000000000000000E0_WP, & 1.00000000000000000000000000E0_WP, & 1.00000000000000000000000000E0_WP, & 2.00000000000000000000000000E0_WP, & 3.00000000000000000000000000E0_WP, & 5.00000000000000000000000000E0_WP, & 8.00000000000000000000000000E0_WP, & 13.00000000000000000000000000E0_WP, & 21.00000000000000000000000000E0_WP, & 34.00000000000000000000000000E0_WP, & 55.00000000000000000000000000E0_WP, & 89.00000000000000000000000000E0_WP, & 144.00000000000000000000000000E0_WP, & 233.00000000000000000000000000E0_WP, & 377.00000000000000000000000000E0_WP, & 610.00000000000000000000000000E0_WP, & 987.00000000000000000000000000E0_WP, & 1597.00000000000000000000000000E0_WP, & 2584.00000000000000000000000000E0_WP, & 4181.00000000000000000000000000E0_WP, & 6765.00000000000000000000000000E0_WP /) ! END MODULE FIBONACCI ! !======================================================================= ! MODULE GAMMA_FUNC ! ! This module defines various values of the Gamma function ! USE ACCURACY_REAL ! IMPLICIT NONE ! REAL (WP), PARAMETER :: GAM_1_HALF= 1.77245385090551602729816748E0_WP ! Gamma(1/2) REAL (WP), PARAMETER :: GAM_1_3RD = 2.67893853470774763365569294E0_WP ! Gamma(1/3) REAL (WP), PARAMETER :: GAM_2_3RD = 1.35411793942640041694528803E0_WP ! Gamma(2/3) REAL (WP), PARAMETER :: GAM_1_4TH = 3.62560990822190831193068515E0_WP ! Gamma(1/4) REAL (WP), PARAMETER :: GAM_3_4TH = 1.22541670246517764512909830E0_WP ! Gamma(3/4) REAL (WP), PARAMETER :: GAM_4_3RD = 0.89297951156924921121856431E0_WP ! Gamma(4/3) REAL (WP), PARAMETER :: GAM_5_3RD = 0.90274529295093361129685868E0_WP ! Gamma(5/3) REAL (WP), PARAMETER :: GAM_5_4TH = 0.90640247705547707798267129E0_WP ! Gamma(5/4) REAL (WP), PARAMETER :: GAM_7_4TH = 0.91906252684888323384682373E0_WP ! Gamma(7/4) ! COMPLEX (WP), PARAMETER :: GAM_I =(-0.15494982830181068512495513E0_WP, &! -0.49801566811835604271369112E0_WP) ! Gamma(i) COMPLEX (WP), PARAMETER :: GAM_1I =( 0.49801566811835604271369112E0_WP, &! -0.15494982830181068512495513E0_WP) ! Gamma(i+1) ! END MODULE GAMMA_FUNC ! !======================================================================= ! MODULE PI_ETC ! ! This module defines Pi-related values ! USE ACCURACY_REAL ! IMPLICIT NONE ! REAL (WP), PARAMETER :: PI = 3.14159265358979323846264338E0_WP ! pi REAL (WP), PARAMETER :: PI2 = 9.86960440108935861883449099E0_WP ! pi^2 REAL (WP), PARAMETER :: PI3 = 31.00627668029982017547631507E0_WP ! pi^3 REAL (WP), PARAMETER :: PI_INV = 0.31830988618379067153776753E0_WP ! 1/pi REAL (WP), PARAMETER :: SQR_PI = 1.77245385090551602729816748E0_WP ! sqrt(pi) REAL (WP), PARAMETER :: CUB_PI = 1.46459188756152326302014253E0_WP ! cube root of pi REAL (WP), PARAMETER :: LOG_PI = 1.14472988584940017414342735E0_WP ! Log(pi) ! END MODULE PI_ETC ! !======================================================================= ! MODULE SQUARE_ROOTS ! ! This module defines values standard square roots ! USE ACCURACY_REAL ! IMPLICIT NONE ! REAL (WP), PARAMETER :: SQR2 = 1.41421356237309504880168872E0_WP ! sqrt(2) REAL (WP), PARAMETER :: SQR3 = 1.73205080756887729352744634E0_WP ! sqrt(3) REAL (WP), PARAMETER :: SQR5 = 2.23606797749978969640917367E0_WP ! sqrt(5) REAL (WP), PARAMETER :: SQR6 = 2.44948974278317809819728407E0_WP ! sqrt(6) REAL (WP), PARAMETER :: SQR7 = 2.64575131106459059050161575E0_WP ! sqrt(7) ! COMPLEX (WP), PARAMETER :: SQRI =( 0.70710678118654752440084436E0_WP ,&! 0.70710678118654752440084436E0_WP) ! sqrt(i) ! END MODULE SQUARE_ROOTS ! !======================================================================= ! MODULE STERLING_1 ! ! This module defines the values of the (signed) Stirling numbers of the first kind ! USE ACCURACY_REAL ! CONTAINS ! !======================================================================= ! FUNCTION SNK_1(N,K) ! ! This function computes the Stirling numbers of the first kind ! ! ! Input parameters: ! ! * N,K : input integer numbers ! ! Output variables : ! ! * SNK_1 : Stirling number S(n,k) ! ! ! Author : D. Sébilleau ! ! Last modified : 7 Aug 2020 ! ! IMPLICIT NONE ! REAL (WP) :: SNK_1 REAL (WP) :: S(0:10,0:10) ! INTEGER :: N,K INTEGER :: I,J ! ! Initialization ! DO I=0,10 ! DO J=0,10 ! S(I,J)=0.0E0_WP ! END DO ! END DO ! ! ! Particular values ! DO I=0,10 ! S(I,I)=1.0E0_WP ! END DO ! S(2,1)=-1.0E0_WP ! ! S(3,1)= 2.0E0_WP ! S(3,2)=-3.0E0_WP ! ! S(4,1)= -6.0E0_WP ! S(4,2)= 11.0E0_WP ! S(4,3)= -6.0E0_WP ! ! S(5,1)= 24.0E0_WP ! S(5,2)=-50.0E0_WP ! S(5,3)= 35.0E0_WP ! S(5,4)=-10.0E0_WP ! ! S(6,1)=-120.0E0_WP ! S(6,2)= 274.0E0_WP ! S(6,3)=-225.0E0_WP ! S(6,4)= 85.0E0_WP ! S(6,5)= -15.0E0_WP ! ! S(7,1)= 720.0E0_WP ! S(7,2)=-1764.0E0_WP ! S(7,3)= 1624.0E0_WP ! S(7,4)= -735.0E0_WP ! S(7,5)= 175.0E0_WP ! S(7,6)= -21.0E0_WP ! ! S(8,1)= -5040.0E0_WP ! S(8,2)= 13068.0E0_WP ! S(8,3)=-13132.0E0_WP ! S(8,4)= 6769.0E0_WP ! S(8,5)= -1960.0E0_WP ! S(8,6)= 322.0E0_WP ! S(8,7)= -28.0E0_WP ! ! S(9,1)= 40320.0E0_WP ! S(9,2)=-109584.0E0_WP ! S(9,3)= 118124.0E0_WP ! S(9,4)= -67284.0E0_WP ! S(9,5)= 22449.0E0_WP ! S(9,6)= -4536.0E0_WP ! S(9,7)= 546.0E0_WP ! S(9,8)= -36.0E0_WP ! ! S(10,1)= -362880.0E0_WP ! S(10,2)= 1026576.0E0_WP ! S(10,3)=-1172700.0E0_WP ! S(10,4)= 723680.0E0_WP ! S(10,5)= -269325.0E0_WP ! S(10,6)= 63273.0E0_WP ! S(10,7)= -9450.0E0_WP ! S(10,8)= 870.0E0_WP ! S(10,9)= -45.0E0_WP ! ! IF(K <= N) THEN ! SNK_1=S(N,K) ! ELSE ! SNK_1=0.0E0_WP ! END IF ! ! END FUNCTION SNK_1 ! END MODULE STERLING_1 ! !======================================================================= ! MODULE STERLING_2 ! ! This module defines the values of the Stirling numbers of the second kind ! USE ACCURACY_REAL ! CONTAINS ! !======================================================================= ! FUNCTION SNK_2(N,K) ! ! This function computes the Stirling numbers of the second kind ! ! ! Input parameters: ! ! * N,K : input integer numbers ! ! Output variables : ! ! * SNK_2 : Stirling number S(n,k) ! ! ! Author : D. Sébilleau ! ! Last modified : 6 Aug 2020 ! ! IMPLICIT NONE ! REAL (WP) :: SNK_2 REAL (WP) :: S(0:10,0:10) ! INTEGER :: N,K INTEGER :: I,J ! ! Initialization ! DO I=0,10 ! DO J=0,10 ! S(I,J)=0.0E0_WP ! END DO ! END DO ! ! ! Particular values ! S(0,0)=1.0E0_WP ! ! DO I=0,10 ! S(I,1)=1.0E0_WP ! S(I,I)=1.0E0_WP ! END DO ! S(3,2)=3.0E0_WP ! ! S(4,2)=7.0E0_WP ! S(4,3)=6.0E0_WP ! ! S(5,2)=15.0E0_WP ! S(5,3)=25.0E0_WP ! S(5,4)=10.0E0_WP ! ! S(6,2)=31.0E0_WP ! S(6,3)=90.0E0_WP ! S(6,4)=65.0E0_WP ! S(6,5)=15.0E0_WP ! ! S(7,2)= 63.0E0_WP ! S(7,3)=301.0E0_WP ! S(7,4)=350.0E0_WP ! S(7,5)=140.0E0_WP ! S(7,6)= 21.0E0_WP ! ! S(8,2)= 127.0E0_WP ! S(8,3)= 966.0E0_WP ! S(8,4)=1701.0E0_WP ! S(8,5)=1050.0E0_WP ! S(8,6)= 266.0E0_WP ! S(8,7)= 28.0E0_WP ! ! S(9,2)= 255.0E0_WP ! S(9,3)=3025.0E0_WP ! S(9,4)=7770.0E0_WP ! S(9,5)=6951.0E0_WP ! S(9,6)=2646.0E0_WP ! S(9,7)= 462.0E0_WP ! S(9,8)= 36.0E0_WP ! ! S(10,2)= 511.0E0_WP ! S(10,3)= 9330.0E0_WP ! S(10,4)=34105.0E0_WP ! S(10,5)=42525.0E0_WP ! S(10,6)=22827.0E0_WP ! S(10,7)= 5880.0E0_WP ! S(10,8)= 750.0E0_WP ! S(10,9)= 45.0E0_WP ! ! IF(K <= N) THEN ! SNK_2=S(N,K) ! ELSE ! SNK_2=0.0E0_WP ! END IF ! ! END FUNCTION SNK_2 ! END MODULE STERLING_2 ! !======================================================================= ! MODULE ZETA_RIEMANN ! ! This module defines values of Riemann's zeta function ! USE ACCURACY_REAL ! IMPLICIT NONE ! REAL (WP), PARAMETER :: ZETA(-20:20) = (/ & ! 0.00000000000000000000000000E0_WP, & ! 0 (-20) 26.45621212121212121212121212E0_WP, & ! 174611 / 6600 (-19) 0.00000000000000000000000000E0_WP, & ! 0 (-18) -3.05395433027011974380395433E0_WP, & ! -43867 / 14364 (-17) 0.00000000000000000000000000E0_WP, & ! 0 (-16) 0.44325980392156862745098039E0_WP, & ! 3617 / 8160 (-15) 0.00000000000000000000000000E0_WP, & ! 0 (-14) -0.08333333333333333333333333E0_WP, & ! -1 / 12 (-13) 0.00000000000000000000000000E0_WP, & ! 0 (-12) 0.02109279609279609279609279E0_WP, & ! 691 / 32760 (-11) 0.00000000000000000000000000E0_WP, & ! 0 (-10) -0.00757575757575757575757576E0_WP, & ! -1 / 132 (- 9) 0.00000000000000000000000000E0_WP, & ! 0 (- 8) 0.00416666666666666666666667E0_WP, & ! 1 / 240 (- 7) 0.00000000000000000000000000E0_WP, & ! 0 (- 6) -0.00396825396825396825396825E0_WP, & ! -1 / 252 (- 5) 0.00000000000000000000000000E0_WP, & ! 0 (- 4) 0.00833333333333333333333333E0_WP, & ! 1 / 120 (- 3) 0.00000000000000000000000000E0_WP, & ! 0 (- 2) -0.08333333333333333333333333E0_WP, & ! -1 / 12 (- 1) -0.50000000000000000000000000E0_WP, & ! -1 / 2 ( 0) 1.000000000000000000000000E+30_WP, & ! infinity ( 1) 1.64493406684822643647241517E0_WP, & ! pi^2 / 6 ( 2) 1.20205690315959428539973816E0_WP, & ! Apéry's constant ( 3) 1.08232323371113819151600369E0_WP, & ! pi^4 / 90 ( 4) 1.03692775514336992633136549E0_WP, & ! ( 5) 1.01734306198444913971451793E0_WP, & ! pi^6 / 945 ( 6) 1.00834927738192282683979755E0_WP, & ! ( 7) 1.00407735619794433937868524E0_WP, & ! pi^8 / 9450 ( 8) 1.00200839282608221441785277E0_WP, & ! ( 9) 1.00099457512781808533714596E0_WP, & ! pi^10 / 93555 ( 10) 1.00049418860411946455870228E0_WP, & ! ( 11) 1.00024608655330804829863799E0_WP, & ! 691 pi^12 / 638512875 ( 12) 1.00012271334757848914675184E0_WP, & ! ( 13) 1.00006124813505870482925854E0_WP, & ! 2 pi^14 / 18243225 ( 14) 1.00003058823630702049355173E0_WP, & ! ( 15) 1.00001528225940865187173257E0_WP, & ! ( 16) 1.00000763719763789976227360E0_WP, & ! ( 17) 1.00000381729326499983985646E0_WP, & ! ( 18) 1.00000190821271655393892566E0_WP, & ! ( 19) 1.00000095396203387279611315E0_WP & ! ( 20) /) ! ! END MODULE ZETA_RIEMANN