Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// TypeScript Version: 4.1

/**
* Computes the absolute value of single-precision floating-point number `x`.
* Computes the absolute value of a single-precision floating-point number `x`.
*
* @param x - input value
* @returns absolute value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// TypeScript Version: 4.1

/**
* Computes the hyperbolic arccosecant of a number.
* Computes the hyperbolic arccosecant of a double-precision floating-point number.
*
* @param x - input value
* @returns hyperbolic arccosecant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// TypeScript Version: 4.1

/**
* Computes the hyperbolic arcsecant of a number.
* Computes the hyperbolic arcsecant of a double-precision floating-point number.
*
* @param x - input value
* @returns hyperbolic arcsecant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* Computes the binomial coefficient of two integers.
*
* @param n - input value
* @param n - first input value
* @param k - second input value
* @returns function value
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import { Complex128 } from '@stdlib/types/complex';

/**
* Rounds a double-precision complex floating-point number toward negative infinity.
* Rounds each component of a double-precision complex floating-point number toward negative infinity.
*
* @param z - input value
* @returns result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// TypeScript Version: 4.1

/**
* Computes the cotangent of an angle measured in degrees
* Computes the cotangent of an angle measured in degrees.
*
* @param x - input value (in degrees)
* @returns cotangent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
/**
* Computes the coversed cosine.
*
* ## Notes
*
* - The coversed cosine is defined as `1 + sin(x)`.
*
* @param x - input value (in radians)
* @returns coversed cosine
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
/**
* Computes the coversed sine.
*
* ## Notes
*
* - The coversed sine is defined as `1 - sin(x)`.
*
* @param x - input value (in radians)
* @returns coversed sine
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { Collection } from '@stdlib/types/array';
/**
* Interface describing `cpolarf`.
*/
interface Cpolar {
interface Cpolarf {
/**
* Computes the absolute value and the phase of a single-precision complex floating-point number.
*
Expand Down Expand Up @@ -77,7 +77,7 @@ interface Cpolar {
* var v = cpolarf( new Complex64( 5.0, 3.0 ) );
* // returns [ ~5.83, ~0.5404 ]
*/
declare var cpolarf: Cpolar;
declare var cpolarf: Cpolarf;


// EXPORTS //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ import { Complex128 } from '@stdlib/types/complex';
*
* @example
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
* var real = require( '@stdlib/complex/float64/real' );
* var imag = require( '@stdlib/complex/float64/imag' );
*
* var v = cround( new Complex128( -4.2, 5.5 ) );
* // returns <Complex128>[ -4.0, 6.0 ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
/**
* Computes the hypotenuse.
*
* @param x - number
* @param y - number
* @param x - first number
* @param y - second number
* @returns hypotenuse
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
/**
* Computes the hypotenuse of two single-precision floating-point numbers.
*
* @param x - number
* @param y - number
* @param x - first number
* @param y - second number
* @returns hypotenuse
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
* var v = maxf( +0.0, -0.0 );
* // returns -0.0
*/

declare function maxf( x: number, y: number ): number;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// TypeScript Version: 4.1

/**
* Rounds a double-precision floating-point number to the nearest multiple of `10^n` toward negative infinity.
* Rounds a numeric value to the nearest multiple of `10^n` toward negative infinity.
*
* ## Notes
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import { Collection } from '@stdlib/types/array';

/**
* Inteface describing `frexp`.
* Interface describing `frexp`.
*/
interface Frexp {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import { Collection } from '@stdlib/types/array';

/**
* Inteface describing `frexpf`.
* Interface describing `frexpf`.
*/
interface Frexpf {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// TypeScript Version: 4.1

/**
* Calculates the Lanczos sum for the approximation of the gamma function (scaled by `exp(-g)`, where `g = 10.900511`.
* Calculates the Lanczos sum for the approximation of the gamma function (scaled by `exp(-g)`, where `g = 10.900511`).
*
* @param x - input value
* @returns Lanczos sum approximation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
*
* ## Notes
*
* - The `regularized` and `upper` parameters specify whether to evaluate the non-regularized and/or upper incomplete gamma functions, respectively.
* - If provided `x < 0` or `s <= 0`, the function returns `NaN`.
* - The `regularized` parameter specifies whether to evaluate the regularized (default) or non-regularized incomplete gamma function.
* - The `upper` parameter specifies whether to evaluate the lower (default) or upper incomplete gamma function.
* - If provided `x < 0` or `a <= 0`, the function returns `NaN`.
*
* @param x - function parameter
* @param a - function parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* ## Notes
*
* - In contrast to a more commonly used definition, the first argument is the probability `p` and the second argument is the scale factor `a`.
* - By default, the function inverts the lower regularized incomplete gamma function, `P(x,a)`. To invert the upper function `Q(x,a)`, set the `upper` argument to `true`.
* - By default, the function inverts the lower regularized incomplete gamma function, `P(a,x)`. To invert the upper function `Q(a,x)`, set the `upper` argument to `true`.
* - If provided `p < 0` or `p > 1`, the function returns `NaN`.
*
* @param p - probability value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
/**
* Computes the half-value versed cosine.
*
* ## Notes
*
* - The half-value versed cosine is defined as `(1 + cos(x)) / 2`.
*
* @param x - input value (in radians)
* @returns half-value versed cosine
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import { Collection } from '@stdlib/types/array';

/**
* Interface describing `kernalBetaInc`.
* Interface describing `kernelBetainc`.
*/
interface Routine {
/**
Expand All @@ -38,8 +38,8 @@ interface Routine {
* @param x - function input
* @param a - function parameter
* @param b - function parameter
* @param invert - boolean indicating if the function should return the upper tail of the incomplete beta function instead
* @param normalized - boolean indicating if the function should evaluate the regularized boolean beta function
* @param regularized - boolean indicating if the function should evaluate the regularized incomplete beta function
* @param upper - boolean indicating if the function should return the upper tail of the incomplete beta function instead
* @returns function value and first derivative
*
* @example
Expand All @@ -50,7 +50,7 @@ interface Routine {
* var out = kernelBetainc( 0.2, 1.0, 2.0, true, false );
* // returns [ 0.36, 1.6 ]
*/
( x: number, a: number, b: number, invert: boolean, normalized: boolean ): Array<number>;
( x: number, a: number, b: number, regularized: boolean, upper: boolean ): Array<number>;

/**
* Evaluates the incomplete beta function and its first derivative and assigns results to a provided output array.
Expand All @@ -64,8 +64,8 @@ interface Routine {
* @param x - function input
* @param a - function parameter
* @param b - function parameter
* @param invert - boolean indicating if the function should return the upper tail of the incomplete beta function instead
* @param normalized - boolean indicating if the function should evaluate the regularized boolean beta function
* @param regularized - boolean indicating if the function should evaluate the regularized incomplete beta function
* @param upper - boolean indicating if the function should return the upper tail of the incomplete beta function instead
* @param out - output array
* @param stride - output array stride
* @param offset - output array index offset
Expand All @@ -79,7 +79,7 @@ interface Routine {
* var bool = ( arr === out );
* // returns true
*/
assign<T = unknown>( x: number, a: number, b: number, invert: boolean, normalized: boolean, out: Collection<T>, stride: number, offset: number ): Collection<T | number>;
assign<T = unknown>( x: number, a: number, b: number, regularized: boolean, upper: boolean, out: Collection<T>, stride: number, offset: number ): Collection<T | number>;
}

/**
Expand All @@ -94,8 +94,8 @@ interface Routine {
* @param x - function input
* @param a - function parameter
* @param b - function parameter
* @param invert - boolean indicating if the function should return the upper tail of the incomplete beta function instead
* @param normalized - boolean indicating if the function should evaluate the regularized boolean beta function
* @param regularized - boolean indicating if the function should evaluate the regularized incomplete beta function
* @param upper - boolean indicating if the function should return the upper tail of the incomplete beta function instead
* @returns function value and first derivative
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
* @param {Probability} x - function input
* @param {NonNegativeNumber} a - function parameter
* @param {NonNegativeNumber} b - function parameter
* @param {boolean} regularized - boolean indicating if the function should evaluate the regularized boolean beta function
* @param {boolean} regularized - boolean indicating if the function should evaluate the regularized incomplete beta function
* @param {boolean} upper - boolean indicating if the function should return the upper tail of the incomplete beta function instead
* @param {(Array|TypedArray|Object)} out - output array
* @param {integer} stride - output array stride
Expand All @@ -97,7 +97,7 @@
* var out = ibetaImp( 0.2, 1.0, 2.0, true, true, [ 0.0, 0.0 ], 1, 0 );
* // returns [ 0.64, 1.6 ]
*/
function ibetaImp( x, a, b, regularized, upper, out, stride, offset ) {

Check warning on line 100 in lib/node_modules/@stdlib/math/base/special/kernel-betainc/lib/assign.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Function 'ibetaImp' has too many lines (304). Maximum allowed is 200
var lambda;
var prefix;
var fract;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var compute = require( './assign.js' );
* @param {Probability} x - function input
* @param {NonNegativeNumber} a - function parameter
* @param {NonNegativeNumber} b - function parameter
* @param {boolean} regularized - boolean indicating if the function should evaluate the regularized boolean beta function
* @param {boolean} regularized - boolean indicating if the function should evaluate the regularized incomplete beta function
* @param {boolean} upper - boolean indicating if the function should return the upper tail of the incomplete beta function instead
* @returns {Array} function value and first derivative
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* Evaluates the natural logarithm of a single-precision floating-point number.
*
* @param x - input value
* @returns function value
* @returns natural logarithm
*
* @example
* var v = lnf( 4.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* ## Notes
*
* - When an empty set is considered a subset of the extended reals (all real numbers, including positive and negative infinity), negative infinity is the least upper bound. Similar to zero being the identity element for the sum of an empty set and to one being the identity element for the product of an empty set, negative infinity is the identity element for the maximum, and thus, if not provided any arguments, the function returns `+infinity` (i.e., the absolute value of `-infinity`).
* - When an empty set is considered a subset of the extended reals (all real numbers, including positive and negative infinity), negative infinity is the identity element for the maximum. Because the absolute value of negative infinity is positive infinity, if not provided any arguments, the function returns `+infinity`.
*
* @param x - first number
* @param y - second number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
/**
* Returns the minimum absolute value.
*
* ## Notes
*
* - When an empty set is considered a subset of the extended reals (all real numbers, including positive and negative infinity), positive infinity is the greatest upper bound. Similar to zero being the identity element for the sum of an empty set and to one being the identity element for the product of an empty set, positive infinity is the identity element for the minimum, and thus, if not provided any arguments, the function returns positive infinity.
*
* @param x - first number
* @param y - second number
* @returns minimum absolute value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* ## Notes
*
* - When an empty set is considered a subset of the extended reals (all real numbers, including positive and negative infinity), positive infinity is the greatest upper bound. Similar to zero being the identity element for the sum of an empty set and to one being the identity element for the product of an empty set, positive infinity is the identity element for the minimum, and thus, if not provided any arguments, the function returns positive infinity.
* - When an empty set is considered a subset of the extended reals (all real numbers, including positive and negative infinity), positive infinity is the greatest lower bound. Similar to zero being the identity element for the sum of an empty set and to one being the identity element for the product of an empty set, positive infinity is the identity element for the minimum, and thus, if not provided any arguments, the function returns positive infinity.
*
* @param x - first number
* @param y - second number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ interface MinMax {
* var v = minmax( 3.14, 4.2 );
* // returns [ 3.14, 4.2 ]
*
* @example
* var v = minmax( 3.14, NaN );
* // returns [ NaN, NaN ]
*
Expand All @@ -58,7 +59,7 @@ interface MinMax {
*
* @example
* var out = [ 0.0, 0.0 ];
* var v = minmax( 5.9, 3.14, out, 1, 0 );
* var v = minmax.assign( 5.9, 3.14, out, 1, 0 );
* // returns [ 3.14, 5.9 ]
*
* var bool = ( v === out );
Expand All @@ -78,6 +79,7 @@ interface MinMax {
* var v = minmax( 3.14, 4.2 );
* // returns [ 3.14, 4.2 ]
*
* @example
* var v = minmax( 3.14, NaN );
* // returns [ NaN, NaN ]
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@

import { Collection } from '@stdlib/types/array';

/**
* Interface describing an interface for computing minimum and maximum absolute values.
*/
interface MinMaxAbsN {
/**
* Returns the minimum and maximum absolute values.
*
* ## Notes
*
* - When an empty set is considered a subset of the extended reals (all real numbers, including positive and negative infinity), positive infinity is the greatest lower bound and negative infinity is the least upper bound. Similar to zero being the identity element for the sum of an empty set and to one being the identity element for the product of an empty set, positive infinity is the identity element for the minimum and negative infinity is the identity element for the maximum, and thus, if not provided any arguments, the function returns positive infinity for both the minimum and maximum absolute values.
* - When an empty set is considered a subset of the extended reals (all real numbers, including positive and negative infinity), positive infinity is the greatest lower bound and negative infinity is the least upper bound. Similar to zero being the identity element for the sum of an empty set and to one being the identity element for the product of an empty set, positive infinity is the identity element for the minimum and negative infinity is the identity element for the maximum; because both the minimum (+infinity) and the maximum (-infinity) have an absolute value of positive infinity, if not provided any arguments, the function returns positive infinity for both the minimum and maximum absolute values.
*
* @returns minimum and maximum absolute values
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import { Collection } from '@stdlib/types/array';

/**
* Interface describing an interface for computing minimum and maximum of two single-precision floating-point numbers.
* Interface describing a function for computing the minimum and maximum of two single-precision floating-point numbers.
*/
interface MinMaxf {
/**
Expand Down Expand Up @@ -58,7 +58,7 @@ interface MinMaxf {
*
* @example
* var out = [ 0.0, 0.0 ];
* var v = minmaxf( 5.9, 3.14, out, 1, 0 );
* var v = minmaxf.assign( 5.9, 3.14, out, 1, 0 );
* // returns [ 3.14, 5.9 ]
*
* var bool = ( v === out );
Expand Down
Loading
Loading