2 DOUBLE PRECISION FUNCTION dlngam (X)
28 DOUBLE PRECISION x, dxrel, pi, sinpiy, sqpi2l, sq2pil,
xmax,
29 1 y, dgamma, d9lgmc,
d1mach, temp
32 SAVE sq2pil, sqpi2l, pi,
xmax, dxrel, first
33 DATA sq2pil / 0.9189385332 0467274178 0329736405 62 d0 /
34 DATA sqpi2l / +.2257913526 4472743236 3097614947 441 d+0 /
35 DATA pi / 3.1415926535 8979323846 2643383279 50 d0 /
46 IF (y.GT.10.d0)
GO TO 20
50 dlngam =
log(
abs(dgamma(x)) )
55 20
IF (y .GT.
xmax)
CALL xermsg (
'SLATEC',
'DLNGAM',
56 +
'ABS(X) SO BIG DLNGAM OVERFLOWS', 2, 2)
58 IF (x.GT.0.d0) dlngam = sq2pil + (x-0.5d0)*
log(x) - x + d9lgmc(y)
61 sinpiy =
abs(sin(pi*y))
62 IF (sinpiy .EQ. 0.d0)
CALL xermsg (
'SLATEC',
'DLNGAM',
63 +
'X IS A NEGATIVE INTEGER', 3, 2)
65 IF (
abs((x-aint(x-0.5d0))/x) .LT. dxrel)
CALL xermsg (
'SLATEC',
67 +
'ANSWER LT HALF PRECISION BECAUSE X TOO NEAR NEGATIVE INTEGER',
70 dlngam = sqpi2l + (x-0.5d0)*
log(y) - x -
log(sinpiy) - d9lgmc(y)
octave_int< T > xmax(const octave_int< T > &x, const octave_int< T > &y)
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the base of natural logarithms The constant ex $e satisfies the equation log(e)
double precision function d1mach(i)