bI {Bessel} | R Documentation |
Computes the modified Bessel I function, using one of its basic
definitions as an infinite series. The implementation is pure R,
working for numeric
, complex
, but also
e.g., for objects of class "mpfr"
from package Rmpfr.
bI(x, nu, nterm = 800, expon.scaled = FALSE, log = FALSE, Ceps = if (isNum) 8e-16 else 2^(-x@.Data[[1]]@prec))
x |
numeric of complex vector, or of another |
nu |
non-negative numeric (scalar). |
nterm |
integer indicating the number of terms to be used.
should be in the order of |
expon.scaled |
logical indicating if the result should be scaled by exp(-abs(x)). |
log |
logical indicating if the logarithm log I.() is required. is not yet implemented ! |
Ceps |
a relative error tolerance for checking if |
a “numeric” (or complex or ...) vector of the same class and
length as x
.
Martin Maechler
Abramowitz, M., and Stegun, I. A. (1955, etc). Handbook of mathematical functions (NBS AMS series 55, U.S. Dept. of Commerce).
This package BesselI
, base besselI
, etc
stopifnot(all.equal(bI (1:10, 1), # R code besselI(1:10, 1)))# internal C code w/ different algorithm