complex_gamma: Gamma function for complex arguments

Description Usage Arguments Details Author(s) References Examples

Description

Gamma and factorial functions for complex arguments

Usage

1
2
3

Arguments

z

Primary argument, a complex vector

log

Boolean, with default FALSE meaning to return the function value and TRUE meaning to return its logarithm

Details

Method follows that of Lanczos, coefficients identical to those of the GSL

Author(s)

Robin K. S. Hankin

References

Lanczos, C. 1964. “A precision approximation of the gamma function”. Journal of the society for industrial and applied mathematics series B, Volume 1, pp86-96

M. Galassi et al, GNU Scientific Library Reference Manual (3rd Ed.), ISBN 0954612078.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
complex_gamma(5)  # should be 4!=24

complex_gamma(1+1i)   # takes complex arguments

complex_gamma(-5/2) + sqrt(pi)*8/15  # should be small

z <- pi + 1i*sqrt(2)
complex_gamma(z+1)-z*complex_gamma(z)   # should be small


complex_gamma(z)*complex_gamma(1-z) - pi/sin(pi*z)  # small

hypergeo documentation built on May 2, 2019, 3:27 p.m.