@stdlib/math-base-special

Standard library base special math functions.


Keywords
stdlib, stdmath, standard, library, std, lib, mathematics, math, javascript, node, node-js, nodejs
License
Apache-2.0
Install
npm install @stdlib/math-base-special@0.0.96

Documentation

Special Functions

NPM version Build Status Coverage Status dependencies

Standard library base special math functions.

Installation

npm install @stdlib/math-base-special

Usage

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

special

Standard library base special math functions.

var fcns = special;
// returns {...}

Exponential & Logarithmic Functions

Trigonometric Functions

Bessel Functions

  • besselj0( x ): compute the Bessel function of the first kind of order zero.
  • besselj1( x ): compute the Bessel function of the first kind of order one.
  • bessely0( x ): compute the Bessel function of the second kind of order zero.
  • bessely1( x ): compute the Bessel function of the second kind of order one.

Absolute Value and Rounding Functions

  • abs( x ): compute the absolute value of a double-precision floating-point number.
  • abs2( x ): compute the squared absolute value of a double-precision floating-point number.
  • abs2f( x ): compute the squared absolute value of a single-precision floating-point number.
  • absf( x ): compute the absolute value of a single-precision floating-point number.
  • cabs( re, im ): compute an absolute value of a complex number.
  • cabs2( re, im ): compute the squared absolute value of a complex number.
  • cceil( [out,] re, im ): round a complex number toward positive infinity.
  • cceiln( [out,] re, im, n ): round a complex number to the nearest multiple of 10^n toward positive infinity.
  • ceil( x ): round a double-precision floating-point number toward positive infinity.
  • ceil10( x ): round a numeric value to the nearest power of 10 toward positive infinity.
  • ceil2( x ): round a numeric value to the nearest power of two toward positive infinity.
  • ceilb( x, n, b ): round a numeric value to the nearest multiple of b^n toward positive infinity.
  • ceilf( x ): round a single-precision floating-point number toward positive infinity.
  • ceiln( x, n ): round a numeric value to the nearest multiple of 10^n toward positive infinity.
  • ceilsd( x, n[, b] ): round a numeric value to the nearest number toward positive infinity with N significant figures.
  • cfloor( [out,] re, im ): round a complex number toward negative infinity.
  • cfloorn( [out,] re, im, n ): round a complex number to the nearest multiple of 10^n toward negative infinity.
  • clamp( v, min, max ): restrict a double-precision floating-point number to a specified range.
  • clampf( v, min, max ): restrict a single-precision floating-point number to a specified range.
  • cround( [out,] re, im ): round a complex number to the nearest integer.
  • croundn( [out,] re, im, n ): round a complex number to the nearest multiple of 10^n.
  • csignum( [out,] re, im ): evaluate the signum function of a complex number.
  • floor( x ): round a double-precision floating-point number toward negative infinity.
  • floor10( x ): round a numeric value to the nearest power of 10 toward negative infinity.
  • floor2( x ): round a numeric value to the nearest power of two toward negative infinity.
  • floorb( x, n, b ): round a numeric value to the nearest multiple of b^n toward negative infinity.
  • floorf( x ): round a single-precision floating-point numeric value toward negative infinity.
  • floorn( x, n ): round a numeric value to the nearest multiple of 10^n toward negative infinity.
  • floorsd( x, n[, b] ): round a numeric value to the nearest number toward negative infinity with N significant figures.
  • labs( x ): compute an absolute value of a signed 32-bit integer.
  • maxabs( [x[, y[, ...args]]] ): return the maximum absolute value.
  • minabs( [x[, y[, ...args]]] ): return the minimum absolute value.
  • minmaxabs( [out,] x[, y[, ...args]] ): return the minimum and maximum absolute values.
  • round( x ): round a numeric value to the nearest integer.
  • round10( x ): round a numeric value to the nearest power of 10 on a linear scale.
  • round2( x ): round a numeric value to the nearest power of two on a linear scale.
  • roundb( x, n, b ): round a numeric value to the nearest multiple of b^n on a linear scale.
  • roundn( x, n ): round a numeric value to the nearest multiple of 10^n.
  • roundsd( x, n[, b] ): round a numeric value to the nearest number with n significant figures.
  • signum( x ): signum function.
  • signumf( x ): signum function.
  • trunc( x ): round a double-precision floating-point number toward zero.
  • trunc10( x ): round a numeric value to the nearest power of 10 toward zero.
  • trunc2( x ): round a numeric value to the nearest power of two toward zero.
  • truncb( x, n, b ): round a numeric value to the nearest multiple of b^n toward zero.
  • truncf( x ): round a single-precision floating-point number toward zero.
  • truncn( x, n ): round a numeric value to the nearest multiple of 10^n toward zero.
  • truncsd( x, n[, b] ): round a numeric value to the nearest number toward zero with n significant figures.

Other Special Functions

Fast algorithms of various special functions, which trade accuracy for increased speed, are available in the following sub-namespace:

  • fast: standard library fast math special functions.

Finally, the namespace exports the following kernel functions, which are mainly used internally. Beware that they may only be applicable for input values inside a certain number range and/or may not work as expected if not all arguments satisfy the parameter requirements.

Examples

var objectKeys = require( '@stdlib/utils-keys' );
var special = require( '@stdlib/math-base-special' );

console.log( objectKeys( special ) );

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.