~maddevelopers/mg5amcnlo/2.9.4

« back to all changes in this revision

Viewing changes to vendor/CutTools/src/qcdloop/qlcLi2omx2.f

pass to v2.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      double complex function qlcLi2omx2(z1,z2,ieps1,ieps2)
 
2
C     Calculates Li[2](1-(z1+ieps1)*(z2+ieps2)) for complex z1,z2
 
3
C     Using +Li2(1-z1*z2)                           for z1*z2<1
 
4
C     and   -Li2(1-1/(z1*z2))-1/2*(ln(z1)+ln(z2))^2 for z1*z2>1
 
5
      implicit none
 
6
      include 'qlconstants.f'
 
7
      double precision ieps1,ieps2,ieps
 
8
      double complex z1,z2,lnarg,lnomarg,prod,cln,denspence,arg
 
9
      arg=z1*z2
 
10
      ieps=sign(one,dreal(z2)*ieps1+dreal(z1)*ieps2)
 
11
      if (abs(arg) .le. 1d0) then
 
12
         if (arg .eq. 0d0 .or. arg .eq. 1d0) then
 
13
            prod=0d0
 
14
         else
 
15
            lnarg=cln(z1,ieps1)+cln(z2,ieps2)
 
16
            lnomarg=cln(cone-arg,-ieps)
 
17
            prod = lnarg*lnomarg
 
18
         endif
 
19
         qlcLi2omx2=dcmplx(pisqo6)-denspence(arg,ieps)-prod
 
20
      elseif (abs(arg) .gt. 1d0) then
 
21
         arg=1d0/(z1*z2)
 
22
         lnomarg=cln(cone-arg,-ieps)
 
23
         lnarg=-cln(z1,ieps1)-cln(z2,ieps2)
 
24
         qlcLi2omx2=-dcmplx(pisqo6)+denspence(arg,ieps)
 
25
     .   +lnarg*lnomarg-0.5d0*lnarg**2
 
26
      endif
 
27
      return
 
28
      end