57 REAL a1,a2,a3,a4,a5,a6,a7,aa,aaa,b,b0,c,d,e,e1,e2,e3,e4,e5,p,q,q0,
58 + q1,q2,q3,q4,q5,q6,q7,r,s,s2,si,sqrt32,t,u,v,w,x
65 INTRINSIC abs,alog,exp,sign,sqrt
69 SAVE aa,aaa,s2,s,d,q0,b,si,c,q1,q2,q3,q4,q5,q6,q7,a1,a2,a3,a4,a5,
70 + a6,a7,e1,e2,e3,e4,e5,sqrt32
77 DATA q1,q2,q3,q4,q5,q6,q7/.04166669,.02083148,.00801191,.00144121,
78 + -.00007388,.00024511,.00024240/
79 DATA a1,a2,a3,a4,a5,a6,a7/.3333333,-.2500030,.2000062,-.1662921,
80 + .1423657,-.1367177,.1233795/
81 DATA e1,e2,e3,e4,e5/1.,.4999897,.1668290,.0407753,.0102930/
82 DATA aa/0.0/,aaa/0.0/,sqrt32/5.656854/
87 IF (a.LT.1.0)
GO TO 130
108 IF (d*u.LE.t*t*t)
RETURN
112 IF (a.EQ.aaa)
GO TO 40
115 q0 = ((((((q7*r+q6)*r+q5)*r+q4)*r+q3)*r+q2)*r+q1)*r
121 IF (a.LE.3.686)
GO TO 30
122 IF (a.LE.13.022)
GO TO 20
133 20 b = 1.654 + .0076*s2
140 30 b = .463 + s + .178*s2
142 c = .195/s - .079 + .16*s
146 40
IF (x.LE.0.0)
GO TO 70
151 IF (abs(v).LE.0.25)
GO TO 50
152 q = q0 - s*t + 0.25*t*t + (s2+s2)*alog(1.0+v)
155 50 q = q0 + 0.5*t*t* ((((((a7*v+a6)*v+a5)*v+a4)*v+a3)*v+a2)*v+a1)*v
159 60
IF (alog(1.0-u).LE.q)
RETURN
172 80
IF (t.LT. (-.7187449))
GO TO 70
177 IF (abs(v).LE.0.25)
GO TO 90
178 q = q0 - s*t + 0.25*t*t + (s2+s2)*alog(1.0+v)
181 90 q = q0 + 0.5*t*t* ((((((a7*v+a6)*v+a5)*v+a4)*v+a3)*v+a2)*v+a1)*v
185 100
IF (q.LE.0.0)
GO TO 70
186 IF (q.LE.0.5)
GO TO 110
190 IF (q.LT.15.0)
GO TO 105
197 IF ((q+e-0.5*t*t).GT.87.49823)
GO TO 125
198 IF (c*abs(u).GT.exp(q+e-0.5*t*t))
GO TO 70
204 110 w = ((((e5*q+e4)*q+e3)*q+e2)*q+e1)*q
208 120
IF (c*abs(u).GT.w*exp(e-0.5*t*t))
GO TO 70
224 130 b0 = 1.0 + .3678794*a
226 IF (p.GE.1.0)
GO TO 150
231 150
sgamma = -alog((b0-p)/a)