| safe_exp | R Documentation |
Computes exp(x) with protection against overflow. Values above
max_exp are clamped before exponentiation to avoid Inf.
safe_exp(x, max_exp = 700, warn = TRUE, param_name = "exponent")
x |
Numeric value or vector |
max_exp |
Maximum allowed exponent, default 700 |
warn |
Logical; issue a warning when clamping occurs, default TRUE |
param_name |
Name used in warning messages |
exp(x), or exp(max_exp) for values that would overflow
safe_exp(1)
suppressWarnings(safe_exp(1000))
suppressWarnings(safe_exp(-1000))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.