erf: Error function

erfR Documentation

Error function

Description

Computes \mathrm{erf}(x) = \frac{2}{\sqrt{\pi}} \int_0^x e^{-t^2} dt.

Usage

erf(x)

## S4 method for signature 'numeric'
erf(x)

## S4 method for signature 'dualr'
erf(x)

Arguments

x

A numeric or dual value.

Value

The error function value. For dual input, returns a dual with derivative (2/\sqrt{\pi}) e^{-x^2}.

Examples

erf(1)
x <- dual_variable(1)
value(erf(x))

nabla documentation built on Feb. 11, 2026, 1:06 a.m.