arb_hypgeom_2f1 function

Hypergeometric Functions

Hypergeometric Functions

Computes the principal branch of the hypergeometric function F(a,b,c,z)F(a, b, c, z), defined by [REMOVE_ME]k=0(a)k(b)k(c)kzkk!sumk=0,1,((a)k(b)k/(c)k)(zk/k!)[REMOVEME2] \sum_{k = 0}^{\infty} \frac{(a)_{k} (b)_{k}}{(c)_{k}} \frac{z^{k}}{k!}sum_{k = 0, 1, \ldots} ((a)_k * (b)_k/(c)_k) * (z^k/k!) [REMOVE_ME_2]

for Mod(z)<1Mod(z) < 1 and by analytic continuation elsewhere in the zz-plane, or the principal branch of the regularized hypergeometric function F(a,b,c,z)/Gamma(c)F(a, b, c, z)/Gamma(c).

Description

Computes the principal branch of the hypergeometric function F(a,b,c,z)F(a, b, c, z), defined by

k=0(a)k(b)k(c)kzkk!sumk=0,1,((a)k(b)k/(c)k)(zk/k!) \sum_{k = 0}^{\infty} \frac{(a)_{k} (b)_{k}}{(c)_{k}} \frac{z^{k}}{k!}sum_{k = 0, 1, \ldots} ((a)_k * (b)_k/(c)_k) * (z^k/k!)

for Mod(z)<1Mod(z) < 1 and by analytic continuation elsewhere in the zz-plane, or the principal branch of the regularized hypergeometric function F(a,b,c,z)/Gamma(c)F(a, b, c, z)/Gamma(c).

arb_hypgeom_2f1(a, b, c, x, flags = 0L, prec = flintPrec()) acb_hypgeom_2f1(a, b, c, z, flags = 0L, prec = flintPrec())

Arguments

  • a, b, c, x, z: numeric, complex, arb, or acb vectors.
  • flags: an integer vector. The lowest bit of the integer element(s) indicates whether to regularize. Later bits indicate special cases for which an alternate algorithm may be used. Non-experts should use flags = 0L or 1L, leaving the later bits unset.
  • prec: a numeric or slong vector indicating the desired precision as a number of bits.

Returns

An arb or acb vector storing function values with error bounds. Its length is the maximum of the lengths of the arguments or zero (zero if any argument has length zero). The arguments are recycled as necessary.

See Also

Classes arb and acb.

References

The FLINT documentation of the underlying

functions: https://flintlib.org/doc/arb_hypgeom.html, https://flintlib.org/doc/acb_hypgeom.html

NIST Digital Library of Mathematical Functions: https://dlmf.nist.gov/15

Examples

h2f1 <- acb_hypgeom_2f1 set.seed(0xbcdeL) r <- 10L eps <- 0x1p-4 z.l1 <- flint:::complex.runif(r, modulus = c( 0, 1-eps)) z.g1 <- flint:::complex.runif(r, modulus = c(1+eps, 1/eps)) z <- .acb(x = c(z.l1, z.g1)) ## Elementary special cases from http://dlmf.nist.gov/15.4 : stopifnot(all.equal(h2f1(1.0, 1.0, 2.0, z ), -log(1 - z)/z), all.equal(h2f1(0.5, 1.0, 1.5, z^2), 0.5 * (log(1 + z) - log(1 - z))/z), all.equal(h2f1(0.5, 1.0, 1.5, -z^2), atan(z)/z)) ## [ see more in ../tests/hypgeom.R ]
  • Maintainer: Mikael Jagan
  • License: GPL (>= 2)
  • Last published: 2025-03-24