Erf

org.appliedtopology.tda4j.Erf
object Erf

The error function erf(x) = 2/sqrt(pi) * integral_0^x exp(-t^2) dt and its complement erfc(x) = 1 - erf(x).

Computed by W. J. Cody's rational Chebyshev approximations ("Rational Chebyshev approximations for the error function", Mathematics of Computation 23, 1969): one in x on |x| <= 0.46875, one in exp(-x^2) times a rational function of x up to 4, and one in 1/x^2 beyond. erf is accurate to 4e-16 absolute (a few units in the last place), erfc to a relative 2e-15 out to where it underflows (near x = 26.5). erf is exactly odd and exactly +-1 from |x| = 6.

Attributes

Experimental
true
Source
Erf.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Erf.type

Members list

Value members

Concrete methods

def erf(x: Double): Double

The error function. erf(NaN) is NaN, erf(+-Infinity) is +-1.

The error function. erf(NaN) is NaN, erf(+-Infinity) is +-1.

Attributes

Source
Erf.scala
def erfc(x: Double): Double

The complementary error function 1 - erf(x), accurate in relative terms in the tail (where 1 - erf(x) would lose every digit). erfc(NaN) is NaN, erfc(Infinity) is 0, erfc(-Infinity) is 2.

The complementary error function 1 - erf(x), accurate in relative terms in the tail (where 1 - erf(x) would lose every digit). erfc(NaN) is NaN, erfc(Infinity) is 0, erfc(-Infinity) is 2.

Attributes

Source
Erf.scala