Skip to contents

Convenience wrapper: returns Re(eml(x, y)), warning if the imaginary residue exceeds tol (the real part is still returned). Set tol = NA to skip the check.

Usage

eml_real(x, y, tol = 1e-09)

Arguments

x, y

numeric or complex.

tol

numeric tolerance for the imaginary residue, or NA to skip the check.

Value

Numeric.

See also

eml() for the underlying complex-domain operator.

Examples

eml_real(1, 1) # e ~ 2.718
#> [1] 2.718282
eml_real(0.5, 1) # exp(0.5)
#> [1] 1.648721