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

    0.0.4 • Public • Published

    Natural Exponential Function

    NPM version Build Status Coverage Status dependencies

    Natural exponential function.

    The natural exponential function is defined as

    Natural exponential function definition

    where e is Euler's number.

    Installation

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

    Usage

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

    exp( x )

    Evaluates the natural exponential function.

    var v = exp( 4.0 );
    // returns ~54.5982
    
    v = exp( -9.0 );
    // returns ~1.234e-4
    
    v = exp( 0.0 );
    // returns 1.0
    
    v = exp( NaN );
    // returns NaN

    Examples

    var randu = require( '@stdlib/random-base-randu' );
    var exp = require( '@stdlib/math-base-special-exp' );
    
    var x;
    var i;
    
    for ( i = 0; i < 100; i++ ) {
        x = (randu()*100.0) - 50.0;
        console.log( 'e^%d = %d', x, exp( x ) );
    }

    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-2021. The Stdlib Authors.

    Install

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

    Homepage

    stdlib.io

    DownloadsWeekly Downloads

    4,227

    Version

    0.0.4

    License

    Apache-2.0

    Unpacked Size

    45.9 kB

    Total Files

    13

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar