14 REAL aeps, ainta, algap1, alneps, alng, alx,
20 SAVE alneps, sqeps, bot,
first
24 if (
x .eq. 0.0e0)
then
26 if (a .eq. 0.0e0)
then
41 IF (
x .LT. 0.e0) CALL
xermsg(
'SLATEC',
'XGMAINC',
'X IS NEGATIVE'
44 IF (
x.NE.0.e0) alx =
log(
x)
46 IF (a.NE.0.e0) sga = sign(1.0e0, a)
47 ainta = aint(a + 0.5e0*sga)
55 20
IF (
x.GT.1.e0) go to 30
56 IF (a.GE.(-0.5e0) .OR. aeps.NE.0.e0) CALL
algams(a+1.0e0, algap1,
62 30
IF (a.LT.
x) go to 40
74 IF (aeps.EQ.0.e0 .AND. ainta.LE.0.e0) go to 50
76 CALL
algams(a+1.0e0, algap1, sgngam)
77 t =
log(
abs(a)) + alng - algap1
78 IF (t.GT.alneps) go to 60
80 IF (t.GT.(-alneps)) h = 1.0e0 - sga * sgngam *
exp(t)
81 IF (
abs(h).GT.sqeps) go to 50
84 CALL
xermsg(
'SLATEC',
'XGMAINC',
'RESULT LT HALF PRECISION', 1,
94 60
IF (t.LT.bot) CALL
xerclr