Description Usage Arguments Details Author(s) References Examples
Gamma and factorial functions for complex arguments
1 2 3 | complex_gamma(z, log = FALSE)
complex_factorial(z, log = FALSE)
lanczos(z,log=FALSE)
|
z |
Primary argument, a complex vector |
log |
Boolean, with default |
Method follows that of Lanczos, coefficients identical to those of the GSL
Robin K. S. Hankin
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.
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.