ecd.mpfr_qagi: Utility to integrate mpfr with infinity via qagi

View source: R/ecd-mpfr-qagi-method.R

ecd.mpfr_qagiR Documentation

Utility to integrate mpfr with infinity via qagi

Description

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.

Usage

ecd.mpfr_qagi(
  object,
  f,
  lower,
  upper,
  ...,
  abs.tol = .Machine$double.eps^0.25,
  show.warning = TRUE
)

Arguments

object

an object of ecd class

f

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.

lower

numeric, the lower limit of integration. Can be infinite.

upper

numeric, the upper limit of integration. Can be infinite.

...

addtional arguments for f.

abs.tol

numeric, the suggested absolute tolerance.

show.warning

logical, to suppress warnings or not.

Value

The integrate object

Author(s)

Stephen H. Lihn


ecd documentation built on May 10, 2022, 1:07 a.m.