Skip to content
class method

Math.erf

(::Math::double x) -> ::Float
Math.erf(x) → float

Returns the value of the Gauss error function for x.

  • Domain: [-INFINITY, INFINITY].

  • Range: [-1, 1].

Examples:

Example
erf(-INFINITY) # => -1.0
erf(0.0)       # => 0.0
erf(INFINITY)  # => 1.0

Related: Math.erfc.

See also .cosh .erfc .cos .exp also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0