157 REAL al,alv,amaxp,c,
f,f1,f2,ffm,fm,g,p,p1,p2,p3,p4,psave,q,qn,r,u,
158 + v,w,w2,
x,x1,x2,xl,xll,xlr,xm,xnp,xnpq,xr,ynorm,z,z2
159 INTEGER i,ix,ix1,k,m,mp,nsave
166 INTRINSIC abs,alog,amin1,iabs,int,
sqrt
169 SAVE p,q,m,fm,xnp,xnpq,p1,xm,xl,xr,c,xll,xlr,p2,p3,p4,qn,r,g,
176 DATA psave,nsave/-1.0e37,-214748365/
179 IF (pp.NE.psave) go to 10
180 IF (n.NE.nsave) go to 20
181 IF (xnp-30.0.LT.0.0) go to 150
191 10
IF (pp.LT.0.0) CALL xstopx(
'PP < 0.0 in IGNBIN - ABORT!')
192 IF (pp.GT.1.0) CALL xstopx(
'PP > 1.0 in IGNBIN - ABORT!')
194 p = amin1(psave,1.-psave)
196 20
IF (n.LT.0) CALL xstopx(
'N < 0 in IGNBIN - ABORT!')
199 IF (xnp.LT.30.) go to 140
204 p1 = int(2.195*
sqrt(xnpq)-4.6*q) + 0.5
208 c = 0.134 + 20.5/ (15.3+fm)
209 al = (ffm-xl)/ (ffm-xl*p)
211 al = (xr-ffm)/ (xr*q)
226 IF (u.GT.p1) go to 40
232 40
IF (u.GT.p2) go to 50
234 v = v*c + 1. -
abs(xm-
x)/p1
235 IF (v.GT.1. .OR. v.LE.0.) go to 30
241 50
IF (u.GT.p3) go to 60
242 ix = xl + alog(v)/xll
243 IF (ix.LT.0) go to 30
249 60 ix = xr - alog(v)/xlr
250 IF (ix.GT.n) go to 30
256 IF (k.GT.20 .AND. k.LT.xnpq/2-1) go to 130
263 IF (m-ix.LT.0) go to 80
264 IF (m-ix.EQ.0) go to 120
276 120
IF (v-
f.LE.0) go to 170
281 130 amaxp = (k/xnpq)* ((k* (k/3.+.625)+.1666666666666)/xnpq+.5)
282 ynorm = -k*k/ (2.*xnpq)
284 IF (alv.LT.ynorm-amaxp) go to 170
285 IF (alv.GT.ynorm+amaxp) go to 30
298 IF (alv- (xm*alog(f1/x1)+ (n-m+.5)*alog(z/w)+ (ix-
299 + m)*alog(w*p/ (x1*q))+ (13860.- (462.- (132.- (99.-
300 + 140./f2)/f2)/f2)/f2)/f1/166320.+ (13860.- (462.- (132.- (99.-
301 + 140./z2)/z2)/z2)/z2)/z/166320.+ (13860.- (462.- (132.- (99.-
302 + 140./x2)/x2)/x2)/x2)/x1/166320.+ (13860.- (462.- (132.- (99.-
303 + 140./w2)/w2)/w2)/w2)/w/166320.) .LE. 0.) go to 170
314 160
IF (u.LT.
f) go to 170
315 IF (ix.GT.110) go to 150
321 170
IF (psave.GT.0.5) ix = n - ix