Special Functions

Base (i.e., lower-level) special math functions.

Usage

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

special

Namespace for "base" (i.e., lower-level) special math functions.

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

Exponential & Logarithmic Functions

Trigonometric Functions

  • acos( x ): compute the arccosine of a double-precision floating-point number.
  • acosd( x ): compute the arccosine in degrees of a double-precision floating-point number.
  • acosf( x ): compute the arccosine of a single-precision floating-point number.
  • acosh( x ): compute the hyperbolic arccosine of a double-precision floating-point number.
  • acovercos( x ): compute the inverse coversed cosine.
  • acoversin( x ): compute the inverse coversed sine.
  • ahavercos( x ): compute the inverse half-value versed cosine.
  • ahaversin( x ): compute the inverse half-value versed sine.
  • asin( x ): compute the arcsine of a double-precision floating-point number.
  • asind( x ): compute the arcsine (in degrees) of a double-precision floating-point number.
  • asindf( x ): compute the arcsine (in degrees) of a single-precision floating-point number.
  • asinf( x ): compute the arcsine of a single-precision floating-point number.
  • asinh( x ): compute the hyperbolic arcsine of a double-precision floating-point number.
  • atan( x ): compute the arctangent of a double-precision floating-point number.
  • atan2( y, x ): compute the angle in the plane (in radians) between the positive x-axis and the ray from (0,0) to the point (x,y).
  • atand( x ): compute the arctangent in degrees of a double-precision floating-point number.
  • atanf( x ): compute the arctangent of a single-precision floating-point number.
  • atanh( x ): compute the hyperbolic arctangent of a double-precision floating-point number.
  • avercos( x ): compute the inverse versed cosine.
  • aversin( x ): compute the inverse versed sine.
  • cos( x ): compute the cosine of a number.
  • cosd( x ): computes the cosine of an angle measured in degrees.
  • cosh( x ): compute the hyperbolic cosine of a double-precision floating-point number.
  • cosm1( x ): compute cos(x) - 1.
  • cospi( x ): compute the cosine of a number times π.
  • covercos( x ): compute the coversed cosine.
  • coversin( x ): compute the coversed sine.
  • hacovercos( x ): compute the half-value coversed cosine.
  • hacoversin( x ): compute the half-value coversed sine.
  • havercos( x ): compute the half-value versed cosine.
  • haversin( x ): compute the half-value versed sine.
  • risingFactorial( x, n ): compute the rising factorial.
  • sin( x ): compute the sine of a number.
  • sinc( x ): compute the cardinal sine of a number.
  • sincos( x ): simultaneously compute the sine and cosine of a number.
  • sincospi(): simultaneously compute the sine and cosine of a number times π.
  • sinh( x ): compute the hyperbolic sine of a double-precision floating-point number.
  • sinpi( x ): compute the sine of a number times π.
  • tan( x ): evaluate the tangent of a number.
  • tand( x ): computes the tangent of an angle measured in degrees.
  • tanh( x ): compute the hyperbolic tangent of a double-precision floating-point number.
  • vercos( x ): compute the versed cosine.
  • versin( x ): compute the versed sine.

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( z ): compute the absolute value of a double-precision complex floating-point number.
  • cabs2( z ): compute the squared absolute value of a double-precision complex floating-point number.
  • cabs2f( z ): compute the squared absolute value of a single-precision complex floating-point number.
  • cabsf( z ): compute the absolute value of a single-precision complex floating-point number.
  • cceil( z ): round a double-precision complex floating-point number toward positive infinity.
  • cceilf( z ): round a single-precision complex floating-point number toward positive infinity.
  • cceiln( z, n ): round each component of a double-precision complex floating-point 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( z ): round a double-precision complex floating-point number toward negative infinity.
  • cfloorn( z, n ): round each component of a double-precision complex floating-point 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( z ): round each component of a double-precision complex floating-point number to the nearest integer.
  • croundn( z, n ): round each component of a double-precision complex floating-point number to the nearest multiple of 10^n.
  • csignum( z ): evaluate the signum function of a double-precision complex floating-point 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 double-precision floating-point number 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 ): return the maximum absolute value.
  • maxabsn( [x[, y[, ...args]]] ): return the maximum absolute value.
  • minabs( x, y ): return the minimum absolute value.
  • minabsn( [x[, y[, ...args]]] ): return the minimum absolute value.
  • minmaxabs( x, y ): return the minimum and maximum absolute values.
  • minmaxabsn( [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 double-precision floating-point number 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: 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 ) );
Did you find this page helpful?