This utility supplements Rmpfr::integrateR
with the quadpack qagi method to handle
integration involving infinity. Qagi is a transformation of \(x/sigma=(1-t)/t\) for positive x,
and \(x/sigma=(t-1)/t\) for negative x. \(t=0\) is represented by .Machine$double.eps
.
This utility requires (a) lower
or upper
is +/-Inf
;
(b) lower
and upper
are of the same sign.
ecd.mpfr_qagi(
object,
f,
lower,
upper,
...,
abs.tol = .Machine$double.eps^0.25,
show.warning = TRUE
)
an object of ecd class
an R function taking a numeric first argument and returning a numeric vector of the same length. Returning a non-finite element will generate an error.
numeric, the lower limit of integration. Can be infinite.
numeric, the upper limit of integration. Can be infinite.
addtional arguments for f
.
numeric, the suggested absolute tolerance.
logical, to suppress warnings or not.
The integrate
object