Commit c830b6d1 authored by ulrich_y's avatar ulrich_y

Hot-fix for complex arguments

The easiest way to treat complex arguments is to
just normalise them away..
parent bedaeae3
......@@ -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