Blame view

fvn_fnlib/z0lgmc.f 691 Bytes
0c3098aed   cwaterkeyn   ChW 02/2010 for t...
1
        complex(kind(1.d0)) function z0lgmc (z)
38581db0c   daniau   git-svn-id: https...
2
3
4
5
6
7
8
9
10
        implicit none
  c august 1980 edition.  w. fullerton c3, los alamos scientific lab.
  c
  c evaluate  (z+0.5)*clog((z+1.0)/z) - 1.0  with relative error accuracy.
  c let q = 1.0/z so that
  c     (z+0.5)*clog(1+1/z) - 1 = (z+0.5)*(clog(1+q) - q + q*q/2) - q*q/4
  c        = (z+0.5)*q**3*c9ln2r(q) - q**2/4,
  c where  c9ln2r  is (clog(1+q) - q + 0.5*q**2) / q**3.
  c
0c3098aed   cwaterkeyn   ChW 02/2010 for t...
11
12
        complex(kind(1.d0)) z, q, z9ln2r
        real(kind(1.d0)) zabsz
38581db0c   daniau   git-svn-id: https...
13
14
15
16
17
18
19
20
21
22
23
  
        external z9ln2r
  c
        zabsz = abs(z)
  c
        q = 1.0/z
        if (zabsz.le.1.23) z0lgmc = (z+0.5)*log(1.0+q) - 1.0
        if (zabsz.gt.1.23) z0lgmc = ((1.+.5*q)*z9ln2r(q) - .25) * q**2
  c
        return
        end