ecd.mpfr: Wrapper to convert numeric to mpfr

ecd.mpfrR Documentation

Wrapper to convert numeric to mpfr

Description

Convert numeric to mpfr for ecd calculations. ecd.mp1 is the constant 1 wrapped in mpfr class. ecd.mppi is the function to obtain pi from Rmpfr with an optional precision. This is used to implement ecd.erfq. ecd.gamma is a wrapper on ecld.gamma, which is the incomplete gamma function. ecd.erf is a wrapper on Rmpfr::erf. ecd.erfcx is a wrapper on Rmpfr::erfcx. ecd.erfc is a wrapper on Rmpfr::erfc. This is used to implement ecd.erfq. ecd.dawson is a wrapper on gsl::dawson. Dawson function is used to implement ecd.erfq. ecd.erfi is the imaginary scaled error function, which is implemented through ecd.dawson. ecd.devel is a developer tool to size down intensive mpfr tests for CRAN. Set ecd_devel in R options or OS env to change its value.

Usage

ecd.mpfr(x, precBits = getOption("ecd.precBits"))

ecd.mp1

ecd.mppi(precBits = getOption("ecd.precBits"))

ecd.gamma(s, x, na.stop = TRUE)

ecd.erf(x)

ecd.erfc(x)

ecd.erfcx(x)

ecd.dawson(x)

ecd.erfi(x)

ecd.devel()

Arguments

x

a numeric vector or list. If x is mpfr class, it will be passed through.

precBits

an integer for mpfr precBits. Default is from getOption("ecd.precBits").

s

numeric vector, for the order of incomplete gamma function

na.stop

logical, stop if NaN is generated. The default is TRUE.

Format

An object of class mpfr of length 1.

Value

The mpfr object

Examples

x <- ecd.mpfr(1)
y <- ecd.mpfr(c(1,2,3))
z <- ecd.mp1
p <- ecd.mppi()

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