19 INTEGER,
PARAMETER :: max_nmom = 20
45 REAL*8,
DIMENSION(n_mom),
INTENT(IN) :: m
46 REAL*8,
DIMENSION(n_nodes),
INTENT(OUT) :: xi
47 REAL*8,
DIMENSION(n_nodes),
INTENT(OUT) :: w
50 REAL*8,
DIMENSION(n_nodes,n_nodes) :: jacobi
51 REAL*8,
DIMENSION(n_nodes) :: d
52 REAL*8,
DIMENSION(n_nodes-1) :: e
54 REAL*8,
DIMENSION(n_nodes) :: a , b
55 REAL*8,
DIMENSION(n_nodes+1, 2*n_nodes) :: sigma
57 REAL*8,
DIMENSION(n_nodes,n_nodes) :: evec
61 REAL*8,
DIMENSION(2*n_nodes-2) :: work
92 sigma(k+2,l+1) = sigma(k+1,l+2) - a(k) * sigma(k+1,l+1) - b(k) * &
95 a(k+1) = -sigma(k+1,k+1) / sigma(k+1,k) + sigma(k+2,k+2) / &
98 b(k+1) = sigma(k+2,k+1) / sigma(k+1,k)
118 jacobi(i,i+1) = -(abs(b(i+1)))**0.5
119 jacobi(i+1,i) = -(abs(b(i+1)))**0.5
133 CALL dstev(jobz, n_nodes, d, e, evec, ldz, work, info)
141 w(i) = evec(1,i)**2 * m(1)
175 REAL*8,
DIMENSION(:),
INTENT(INOUT) :: m
176 INTEGER,
INTENT(OUT) :: iter
180 REAL*8,
DIMENSION(n_mom,n_mom) :: bk , bkk
182 REAL*8,
DIMENSION(n_mom,n_mom) :: d
186 LOGICAL :: check_corr
190 REAL*8,
DIMENSION(n_mom) :: cos_quad_alfa
229 bkk(i,j) = bkk(i+1,j-1) - bkk(i,j-1)
248 DO WHILE ( ( check_corr ) .AND. ( iter .LT. iter_max ) )
262 d(i,j) = d(i+1,j-1) - d(i,j-1)
264 IF ( ( j .EQ. 3 ) .AND. ( d(i,j) .LT. 0.d0 ) )
THEN
273 IF ( check_corr )
THEN
280 cos_quad_alfa(k) = ( ( dot_product( bk(k,:) , d(:,4) ) ) / &
281 ( sqrt( dot_product( bk(k,:) , bk(k,:) ) ) * &
282 sqrt( dot_product( d(:,4) , d(:,4) ) ) ) ) **2.d0
284 IF ( cos_quad_alfa(k) .GE. cos_quad_alfa(k_star) )
THEN
292 lnck = -( dot_product( bk(k_star,:) , d(:,4) ) ) / &
293 dot_product( bk(k_star,:) , bk(k_star,:) )
295 m(k_star) = dexp(lnck) * m(k_star)
320 REAL*8,
INTENT(IN):: w,z
322 REAL*8:: gamln_z , gamln_w , gamln_zw
354 REAL*8 :: ser , tmp , x , y , cof(14)
356 cof(1) = 57.1562356658629235
357 cof(2) = -59.5979603554754912
358 cof(3) = 14.1360979747417471
359 cof(4) = -0.491913816097620199
360 cof(5) = 0.339946499848118887d-4
361 cof(6) = 0.465236289270485756d-4
362 cof(7) = -0.983744753048795646d-4
363 cof(8) = 0.158088703224912494d-3
364 cof(9) = -0.210264441724104883d-3
365 cof(10) = 0.217439618115212643d-3
366 cof(11) = -0.164318106536763890d-3
367 cof(12) = 0.844182239838527433d-4
368 cof(13) = -0.261908384015814087d-4
369 cof(14) = .368991826595316234d-5
373 WRITE(*,*)
"bad arg in gammln"
381 tmp = x + 5.2421875d0
382 tmp = ( x + 0.5d0 ) * log(tmp) - tmp
384 ser = 0.999999999999997092
393 gammln = tmp + log(2.5066282746310005*ser/x)
421 INTEGER,
INTENT(IN) :: nmax
424 INTEGER,
DIMENSION(0:nmax,0:nmax),
INTENT(OUT) :: c
445 c(n,m) = c(n-1,m-1) + c(n-1,m)
real *8 function gammln(xx)
Gamma function logarithm.
subroutine coefficient(nmax, c)
Binomial Coefficient.
subroutine moments_correction(m, iter)
Moments correction.
Method of Moments module.
real *8 function beta_function(z, w)
Beta function.
subroutine wheeler_algorithm(m, xi, w)
Wheeler algorithm.