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

    0.0.5 • Public • Published

    fresnels

    NPM version Build Status Coverage Status dependencies

    Compute the Fresnel integral S(x).

    The Fresnel integral S(x) is defined as

    Fresnel integral S(x)

    Some sources define S(x) using t2 for the argument of the sine. To get this function, multiply the computed integral by √(π/2) and multiply the argument x by √(2/π).

    Installation

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

    Usage

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

    fresnels( x )

    Computes the Fresnel integral S(x).

    var v = fresnels( 0.0 );
    // returns ~0.0
    
    v = fresnels( 1.0 );
    // returns ~0.438
    
    v = fresnels( Infinity );
    // returns ~0.5
    
    v = fresnels( -Infinity );
    // returns ~-0.5
    
    v = fresnels( NaN );
    // returns NaN

    Examples

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

    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-fresnels

    Homepage

    stdlib.io

    DownloadsWeekly Downloads

    13

    Version

    0.0.5

    License

    Apache-2.0

    Unpacked Size

    56.6 kB

    Total Files

    13

    Last publish

    Collaborators

    • stdlib-bot
    • kgryte
    • planeshifter
    • rreusser