h2f1 <- function(...) as.complex(acb_hypgeom_2f1(...))
set.seed(0xbcdeL)
r <- 10L
tol <- 0x1p-4
z.l1 <- complex(modulus = runif(r, 0, 1-tol),
argument = runif(r, 0, 2*pi))
z.g1 <- complex(modulus = runif(r, 1+tol, 1/tol),
argument = runif(r, 0, 2*pi))
z <- c(z.l1, z.g1)
## Elementary special cases from http://dlmf.nist.gov/15.4 :
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/acb_hypgeom_2f1.R ]
Run the code above in your browser using DataLab