*DECK DPOCH1 DOUBLE PRECISION FUNCTION DPOCH1 (A, X) C***BEGIN PROLOGUE DPOCH1 C***PURPOSE Calculate a generalization of Pochhammer's symbol starting C from first order. C***LIBRARY SLATEC (FNLIB) C***CATEGORY C1, C7A C***TYPE DOUBLE PRECISION (POCH1-S, DPOCH1-D) C***KEYWORDS FIRST ORDER, FNLIB, POCHHAMMER, SPECIAL FUNCTIONS C***AUTHOR Fullerton, W., (LANL) C***DESCRIPTION C C Evaluate a double precision generalization of Pochhammer's symbol C for double precision A and X for special situations that require C especially accurate values when X is small in C POCH1(A,X) = (POCH(A,X)-1)/X C = (GAMMA(A+X)/GAMMA(A) - 1.0)/X . C This specification is particularly suited for stably computing C expressions such as C (GAMMA(A+X)/GAMMA(A) - GAMMA(B+X)/GAMMA(B))/X C = POCH1(A,X) - POCH1(B,X) C Note that POCH1(A,0.0) = PSI(A) C C When ABS(X) is so small that substantial cancellation will occur if C the straightforward formula is used, we use an expansion due C to Fields and discussed by Y. L. Luke, The Special Functions and Their C Approximations, Vol. 1, Academic Press, 1969, page 34. C C The ratio POCH(A,X) = GAMMA(A+X)/GAMMA(A) is written by Luke as C (A+(X-1)/2)**X * polynomial in (A+(X-1)/2)**(-2) . C In order to maintain significance in POCH1, we write for positive a C (A+(X-1)/2)**X = EXP(X*LOG(A+(X-1)/2)) = EXP(Q) C = 1.0 + Q*EXPREL(Q) . C Likewise the polynomial is written C POLY = 1.0 + X*POLY1(A,X) . C Thus, C POCH1(A,X) = (POCH(A,X) - 1) / X C = EXPREL(Q)*(Q/X + Q*POLY1(A,X)) + POLY1(A,X) C C***REFERENCES (NONE) C***ROUTINES CALLED D1MACH, DCOT, DEXPRL, DPOCH, DPSI, XERMSG C***REVISION HISTORY (YYMMDD) C 770801 DATE WRITTEN C 890531 Changed all specific intrinsics to generic. (WRB) C 890911 Removed unnecessary intrinsics. (WRB) C 890911 REVISION DATE from Version 3.2 C 891214 Prologue converted to Version 4.0 format. (BAB) C 900315 CALLs to XERROR changed to CALLs to XERMSG. (THJ) C 900727 Added EXTERNAL statement. (WRB) C***END PROLOGUE DPOCH1