makeLimitStable: Makes a real function returning limits at undefined points

View source: R/helpers.R

makeLimitStableR Documentation

Makes a real function returning limits at undefined points

Description

The function identifies Punctures in the definition of a function, by getting a non finite result (Inf,-Inf,Nan) and than asks computeLimit to compute the corresponding directional limit (for finite values given by d). The value can still be infinite.

Usage

makeLimitStable(f, x0 = 0.01)

Arguments

f

a function, to be make stable against problems with limits

x0

the direction from which limits shall be taken.

Value

a numerically stabilised version of 'f': a function that evaluates 'f' but replaces any non-finite result (Inf, -Inf, NaN) by the corresponding directional limit obtained from [computeLimit] (which may itself still be infinite).


DistributionalDDA documentation built on Oct. 20, 2026, 5:06 p.m.