library(qwraps2)

set.seed(42)
p <- runif(100)

stopifnot(all.equal(suppressWarnings(logit(p)), log(p/(1-p))))
stopifnot(all.equal(suppressWarnings(invlogit(log(p/(1-p)))), p))

x <- seq(-3, 3, length = 1001)
stopifnot(all.equal(suppressWarnings(invlogit(x)), plogis(x)))

x <- seq(sqrt(.Machine$double.eps),  1 - sqrt(.Machine$double.eps), length = 1001)
stopifnot(all.equal(suppressWarnings(logit(x)), qlogis(x)))
