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 ]
Run the code above in your browser using DataLab