class method
Math.erf
(::Math::double x) -> ::Float
Math.erf(x) → float
math.c
View on GitHub ↗
static VALUE
math_erf(VALUE unused_obj, VALUE x)
{
return DBL2NUM(erf(Get_Double(x)));
}
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.