Blame view

fvn_fnlib/dgamr.f 631 Bytes
38581db0c   daniau   git-svn-id: https...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
        double precision function dgamr (x)
  c july 1977 edition.  w. fullerton, c3, los alamos scientific lab.
  c this routine, not dgamma(x), should be the fundamental one.
  c
        double precision x, alngx, sgngx, dgamma, dint, dexp
        external  dgamma
  c
        dgamr = 0.0d0
        if (x.le.0.0d0 .and. dint(x).eq.x) return
  c
        call entsrc (irold, 1)
        if (dabs(x).gt.10.0d0) go to 10
        dgamr = 1.0d0/dgamma(x)
        call erroff
        call entsrc (ir, irold)
        return
  c
   10   call dlgams (x, alngx, sgngx)
        call erroff
        call entsrc (ir, irold)
        dgamr = sgngx * dexp(-alngx)
        return
  c
        end