Commit 87817de8 authored by ulrich_y's avatar ulrich_y

Merge branch 'bugfix-polylog-conjg'

parents 20852826 c830b6d1
......@@ -326,6 +326,55 @@ CONTAINS
print*, ' ', 'testing GPL ', 'E.20h', ' ...'
res = G((/ izero, inum(-2._prec, -1) /), inum(-3._prec, -1))
call check(res,ref)
! Thanks to Roman Zwicky and Ben Pullin for these tests
ref = (0.392707112217551702879328061598355445_prec, - 1.274969448494380061814943180491890080_prec)
print*, ' ', 'testing GPL ', 'F.1', ' ...'
res = G( (/ (0._prec,0.), (1._prec,0.), (0._prec, 1.5_prec) /) )
call check(res,ref)
ref = (2.09624324167194065961839363660174566_prec, 0.62644605179087454819421905065313983_prec)
print*, ' ', 'testing GPL ', 'F.2', ' ...'
res = G( (/ (1._prec,0.), (-1._prec,0.), (2.5_prec, -2.4_prec) /) )
call check(res,ref)
ref = conjg(ref)
print*, ' ', 'testing GPL ', 'F.3', ' ...'
res = G( (/ (1._prec,0.), (-1._prec,0.), (2.5_prec, +2.4_prec) /) )
call check(res,ref)
ref = (0.6874619495289224183167486785286777066_prec, -1.8261934916106546308783576818077830287_prec)
print*, ' ', 'testing GPL ', 'F.4', ' ...'
res = G( (/ (-1._prec,0.), (1._prec,0.), (2.5_prec, +2.4_prec) /) )
call check(res,ref)
ref = (0.320016770069038023050391296154549_prec , 0.064263450879286017225353602844105_prec)
print*, ' ', 'testing GPL ', 'F.5', ' ...'
res = G( (/ (0._prec,0.), (1._prec,0.), (-1._prec,0.), (0.3_prec, -1.2_prec) /) )
call check(res,ref)
ref = conjg(ref)
print*, ' ', 'testing GPL ', 'F.6', ' ...'
res = G( (/ (0._prec,0.), (1._prec,0.), (-1._prec,0.), (0.3_prec, +1.2_prec) /) )
call check(res,ref)
ref = (0.8382358254435272068734922352_prec, - 0.3702062785327198487992149341_prec)
print*, ' ', 'testing GPL ', 'F.7', ' ...'
res = G( (/ (0._prec,0.), (1._prec,0.), (-1._prec,0.), (1.1_prec,2._prec) /) )
call check(res,ref)
ref = (0.185156872427485220072774923047908301422_prec,-0.249989197161429773744237773045427322847_prec)
print*, ' ', 'testing GPL ', 'F.8', ' ...'
res = G( (/ (1._prec,0.), (-1._prec,0.), (2.3_prec,-1._prec), (1.1_prec,-0.1_prec) /) )
call check(res,ref)
ref = (-1.11161035333074623447215317094270858897_prec,-0.875225967273157437459269290416981432294_prec)
print*, ' ', 'testing GPL ', 'F.9', ' ...'
res = G( (/ (1._prec,0.), (1.1_prec,-0.1_prec), (1._prec,0.), (2.3_prec,-1.2_prec), (3.4_prec,9.7_prec) /) )
call check(res,ref)
end subroutine do_GPL_tests
......
......@@ -126,6 +126,9 @@ CONTAINS
#endif
!res = pending_integral(p,2,[sub_ieps(g(1))]) - pending_integral(p,2,[cmplx(0.0)]) &
! + G_flat(p(2:size(p)), p(1)) * log(-sub_ieps(g(1)))
if(abs(aimag(p(1))).gt.zero) then
p(1)%i0 = int(sign(1._prec, aimag(p(1))),1)
endif
res = pending_integral(p,2,[inum( g(1)%c,-g(1)%i0 ) ]) - pending_integral(p,2,[izero]) &
+ G_flat(p(2:size(p)), p(1)) * (log(g(1)%c) + p(1)%i0 * pi * i_)
return
......@@ -386,6 +389,20 @@ CONTAINS
return
end if
! is complex?
if(abs(aimag(y)).gt.zero) then
#ifdef DEBUG
if(verb >= 30) print*, 'argument is complex, normalising'
#endif
! Here we *assume* that y is positive and doesn't mess up the
! ieps, which is what GiNaC does (l. 1013)
do j=1,size(z_flat)
znorm(j) = inum(z_flat(j)%c/y%c, z_flat(j)%i0)
enddo
res = G_flat(znorm,inum((1.,0.), y%i0))
return
endif
! need make convergent?
if(.not. is_convergent(z_flat,y)) then
#ifdef DEBUG
......
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