Commit 281ece3b authored by ulrich_y's avatar ulrich_y

Merge branch 'master' into mid-pending

parents 150899d3 0193b6c4
......@@ -12,9 +12,9 @@ PROGRAM eval
call parse_cmd_args()
res = GPL([0.1,-1.,1.])
res = GPL([-1.,0.,0.,0.,1.])
print*, res
! res = pending_integral(cmplx([1,3]),2,cmplx([2,4]))
! print*, res
......
......@@ -13,23 +13,6 @@ MODULE gpl_module
CONTAINS
FUNCTION GPL_has_convergent_series(m,z,y)
! tests if GPL has a convergent series representation
integer :: m(:)
complex(kind=prec) :: z(:), y
logical :: GPL_has_convergent_series
GPL_has_convergent_series = .false.
if(all(abs(y) <= abs(z))) then
if(m(1) == 1) then
GPL_has_convergent_series = .true. !(abs((y/z(1) - 1)) < zero)
else
GPL_has_convergent_series = .true.
end if
end if
END FUNCTION GPL_has_convergent_series
FUNCTION GPL_zero_zi(l,y)
! used to compute the value of GPL when all zi are zero
integer :: l
......@@ -279,10 +262,9 @@ CONTAINS
if(verb >= 50) call print_G(z_flat,y)
! catch G(1,1)
if(size(z_flat) == 1) then
if( abs(z_flat(1) - y) <= zero ) then
print*, 'catch G(1,1)'
res = 0
return
end if
......@@ -420,7 +402,7 @@ CONTAINS
end if
! need make convergent?
if(.not. GPL_has_convergent_series(m,z,y)) then
if(.not. all(abs(y) <= abs(z))) then
z_flat = get_flattened_z(m,z)
res = G_flat(z_flat,y)
return
......
......@@ -2,6 +2,7 @@
MODULE mpl_module
use globals
use utils
use maths_functions
implicit none
CONTAINS
......
......@@ -130,8 +130,8 @@ CONTAINS
ref = (-8.403785974849544e-6,0.0)
call test_one_flat(cmplx([-1./xchen,0.,-1./xchen,1./(xchen*z),1.0]),ref,'3.5')
! ref = cmplx((0.4925755847450199,2.6389214054743295))
! call test_one_flat(cmplx([-1.,-1.,z,z,1.]),ref,'3.6')
ref = cmplx((0.4925755847450199,2.6389214054743295))
call test_one_flat(cmplx([-1.,-1.,z,z,1.]),ref,'3.6')
! ref = cmplx((-0.0015317713178859967,-0.00045003911367000565))
! call test_one_flat(cmplx([0.,0.,(1-sqrt(1-z**2))/(xchen*z), 1./(xchen*z),1.]),ref,'3.7')
......@@ -177,7 +177,6 @@ CONTAINS
end subroutine do_GPL_tests
! subroutine do_shuffle_tests()
! complex(kind=prec) :: v(2) = cmplx((/1,2/))
! complex(kind=prec) :: w(2) = cmplx((/3,4/))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment