arb_hypgeom_2f1 | R Documentation |
Computes the principal branch of the hypergeometric function
{}_{2}F_{1}(a, b, c, z)
, defined by
\sum_{k = 0}^{\infty} \frac{(a)_{k} (b)_{k}}{(c)_{k}} \frac{z^{k}}{k!}
for |z| < 1
and by analytic continuation elsewhere
in the z
-plane, or the principal branch of the
regularized hypergeometric function
{}_{2}F_{1}(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())
a , b , c , x , z |
numeric, complex, |
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 |
prec |
a numeric or |
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.
The FLINT documentation of the underlying C 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
Classes arb
and acb
.
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 ]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.