Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "math/base/special/erf/docs/types/index.d"

Index

Functions

Functions

Export assignment erf

  • erf(x: number): number
  • Evaluates the error function.

    Notes

    • As the error function is an odd function (i.e., erf(-x) == -erf(x)), if provided -0, the function returns -0.

    Parameters

    • x: number

      input value

    Returns number

    function value

    Example

    var y = erf( 2.0 );
    // returns ~0.9953

    Example

    var y = erf( -1.0 );
    // returns ~-0.8427

    Example

    var y = erf( -0.0 );
    // returns -0.0

    Example

    var y = erf( NaN );
    // returns NaN