Commit 6f985d96 by ulrich_y

### Merge branch 'bugfix-polylog-conjg' into dev-restruct-test

parents 46c84481 09592838
 ... @@ -400,6 +400,19 @@ CONTAINS ... @@ -400,6 +400,19 @@ CONTAINS END FUNCTION END FUNCTION FUNCTION MYLOG(x) complex(kind=prec) :: x, mylog if (abs(aimag(x)) < zero) then if (real(x) > 0) then mylog = cmplx(log(real(+x,kind=prec)), kind=prec) else mylog = cmplx(log(real(-x,kind=prec)), pi, kind=prec) endif else mylog = log(x) endif END FUNCTION RECURSIVE FUNCTION polylog1(m,x) result(res) RECURSIVE FUNCTION polylog1(m,x) result(res) ! computes the polylog ! computes the polylog ... @@ -433,7 +446,7 @@ CONTAINS ... @@ -433,7 +446,7 @@ CONTAINS else if (abs(x) .gt. 1) then else if (abs(x) .gt. 1) then inv = 1._prec/x inv = 1._prec/x res = (-1)**(m-1)*polylog(m,inv) & res = (-1)**(m-1)*polylog(m,inv) & - (2._prec*pi*i_)**m * bernoulli_polynomial(m, 0.5_prec-i_*log(-x)/2._prec/pi) / factorial(m) - (2._prec*pi*i_)**m * bernoulli_polynomial(m, 0.5_prec-i_*mylog(-x)/2._prec/pi) / factorial(m) else if(m == 2) then else if(m == 2) then res = dilog(x) res = dilog(x) else if(m == 3) then else if(m == 3) then ... @@ -489,7 +502,7 @@ CONTAINS ... @@ -489,7 +502,7 @@ CONTAINS plog1 = plog1 - b%i0*i_*pi plog1 = plog1 - b%i0*i_*pi endif endif else else plog1 = log(1.-a%c/b%c) plog1 = mylog(1.-a%c/b%c) endif endif END FUNCTION END FUNCTION ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!