Nacho Portmanteau Meltdown

    @stdlib/math-base-special-erfc
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.6 • Public • Published

    erfc

    NPM version Build Status Coverage Status

    Complementary error function.

    The complementary error function is defined as

    Complementary error function.

    The complementary error function can also be expressed using Craig's formula

    Craig's formula of the complementary error function.

    Installation

    npm install @stdlib/math-base-special-erfc

    Usage

    var erfc = require( '@stdlib/math-base-special-erfc' );

    erfc( x )

    Evaluates the complementary error function.

    var y = erfc( 2.0 );
    // returns ~0.0047
    
    y = erfc( -1.0 );
    // returns ~1.8427
    
    y = erfc( Infinity );
    // returns 0.0
    
    y = erfc( -Infinity );
    // returns 2.0

    If provided NaN, the function returns NaN.

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

    Examples

    var linspace = require( '@stdlib/array-base-linspace' );
    var erfc = require( '@stdlib/math-base-special-erfc' );
    
    var x = linspace( -10.0, 10.0, 100 );
    
    var i;
    for ( i = 0; i < x.length; i++ ) {
        console.log( 'x: %d, erfc(x): %d', x[ i ], erfc( x[ i ] ) );
    }

    See Also


    Notice

    This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.

    For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.

    Community

    Chat


    License

    See LICENSE.

    Copyright

    Copyright © 2016-2022. The Stdlib Authors.

    Install

    npm i @stdlib/math-base-special-erfc

    Homepage

    stdlib.io

    DownloadsWeekly Downloads

    4,454

    Version

    0.0.6

    License

    Apache-2.0

    Unpacked Size

    83.5 kB

    Total Files

    19

    Last publish

    Collaborators

    • stdlib-bot
    • kgryte
    • planeshifter
    • rreusser