ali.f
568 Bytes
function ali (x)
c august 1980 edition. w. fullerton, c3, los alamos scientific lab.
c
external ei, r1mach
data sqeps / 0.0 /
c
if (sqeps.eq.0.0) sqeps = sqrt(r1mach(3))
if (x.le.0.0) call seteru (
1 41hali log integral undefined for x le 0, 41, 2, 2)
if (x.eq.1.0) call seteru (
1 40hali log integral undefined for x = 1, 40, 3, 2)
if (abs(1.0-x).lt.sqeps) call seteru (57hali answer lt half pr
1ecision because x too close to 1, 57, 1, 1)
c
ali = ei (alog(x) )
c
return
end