| vc_limit | R Documentation |
Probe a finite numerical limit from one or both sides
vc_limit(
f,
x0,
side = c("both", "left", "right"),
h = NULL,
steps = 20L,
atol = 1e-06,
rtol = 1e-04
)
f |
Deterministic function accepting a real scalar and returning one finite real scalar. Vectorization is not required. |
x0 |
Finite real approach point. f(x0) is never evaluated. |
side |
One of both, left or right. |
h |
Positive initial distance. NULL uses 0.1*max(1,abs(x0)). |
steps |
Integer number of halving distances, between 4 and 1000. |
atol, rtol |
Nonnegative absolute/relative comparison tolerances. |
Each side's last three values must agree within atol+rtol*max(abs(a),abs(b)); both-side estimates must also agree. This finite Cauchy-like check is evidence only. Divergence, oscillations, floating-point cancellation and aliased sampling can evade finite tests. Unbounded or unresolved sequences are not replaced by a finite limit or an asserted infinity. Invalid values remain NA. Collapsed/underflowed or overflowing approach points are errors. Existence is never proved.
Plain list with type, x0, side, samples (x, distance, value, side), left, right (side summaries with estimate and stable), estimate (NA unless applicable checks pass), status, and note. status is compatible_finite, side_disagreement, unresolved or unavailable.
f <- function(x) sin(x)/x
f |> vc_limit(x0=0)
vc_limit(function(x) abs(x)/x,0)$status
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.