**Public Function Pochhammer1( _
ByVal vA As Variant _
, ByVal vX As Variant _
) As Variant**

**Calculate a generalization of Pochhammer's symbol starting from first order. **

**Examples:** Pochhammer1(1, 1) = 0
Pochhammer1(1, 2) = 0.5
Pochhammer1(2, 1) = 1
Pochhammer1(2, 2) = 2.5
Pochhammer1(3, 2) = 5.5
Pochhammer1(4, 1) = 3
Pochhammer1(4, 2) = 9.5
Pochhammer1(5, 2) = 14.5

**See also:** Pochhammer Function
DPOCH1 Function

**vA:** Function returns Null if vA is Null or cannot be fixed up to a Double precision floating point number.

**vX:** Function returns Null if vX is Null or cannot be fixed up to a Double precision floating point number. Evaluate a double precision generalization of Pochhammer's symbol for double precision A and X for special situations that require especially accurate values when X is small in

Pochhammer1(A,X) = (Pochhammer(A,X)-1)/X = (GAMMA(A+X)/GAMMA(A) - 1.0)/X

This specification is particularly suited for stably computing expressions such as (GAMMA(A+X)/GAMMA(A) - GAMMA(B+X)/GAMMA(B))/X = POCHHAMMER(A,X) - POCHHAMMER1(B,X)

Note that POCH1(A,0.0) = PSI(A)

When ABS(X) is so small that substantial cancellation will occur if the straightforward formula is used, we use an expansion due to Fields and discussed by Y. L. Luke, The Special Functions and Their Approximations, Vol. 1, Academic Press, 1969, page 34.

The ratio POCH(A,X) = GAMMA(A+X)/GAMMA(A) is written by Luke as (A+(X-1)/2)^X * polynomial in (A+(X-1)/2)^(-2)

In order to maintain significance in POCHHAMMER1, we write for positive a (A+(X-1)/2)**X = EXP(X*LOG(A+(X-1)/2)) = EXP(Q) = 1.0 + Q*EXPREL(Q) .

Likewise the polynomial is written POLY = 1.0 + X*POLY1(A,X) .

Thus, POCHHAMMER1(A,X) = (POCHHAMMER(A,X) - 1) / X = EXPREL(Q)*(Q/X + Q*POLY1(A,X)) + POLY1(A,X)

Copyright 1996-1999 Entisoft

Entisoft Tools is a trademark of Entisoft.