dlamch

Determine double-precision floating-point machine parameters.

Usage

var dlamch = require( '@stdlib/lapack/base/dlamch' );

dlamch( cmach )

Determines double-precision floating-point machine parameters.

var out = dlamch( 'E' );
// returns 1.1102230246251565e-16

The function has the following parameters:

  • cmach: specifies the value to be returned. The following characters are supported:

    • 'E'/'e': (eps) relative machine precision.
    • 'S'/'s': (sfmin) safe minimum such that 1/sfmin does not overflow.
    • 'B'/'b': (base) base of the machine (also known as the floating-point radix).
    • 'P'/'p': (prec) eps*base.
    • 'N'/'n': (t) number of (base) digits in the mantissa.
    • 'R'/'r': (rnd) 1.0 when rounding occurs in addition and 0.0 otherwise.
    • 'M'/'m': (emin) minimum exponent before (gradual) underflow.
    • 'U'/'u': (rmin) underflow threshold.
    • 'L'/'l': (emax) largest exponent before overflow.
    • 'O'/'o': (rmax) overflow threshold.

Notes

Examples

var dlamch = require( '@stdlib/lapack/base/dlamch' );

var out = dlamch( 'E' );
console.log( 'Precision: %d', out );

out = dlamch( 'S' );
console.log( 'Safe minimum: %d', out );

out = dlamch( 'B' );
console.log( 'Base: %d', out );

out = dlamch( 'P' );
console.log( 'Precision*base: %d', out );

out = dlamch( 'N' );
console.log( 'Number of digits in mantissa: %d', out );

out = dlamch( 'R' );
console.log( 'Rounding: %d', out );

out = dlamch( 'M' );
console.log( 'Minimum exponent before underflow: %d', out );

out = dlamch( 'U' );
console.log( 'Underflow threshold: %d', out );

out = dlamch( 'L' );
console.log( 'Maximum exponent before overflow: %d', out );

out = dlamch( 'O' );
console.log( 'Overflow threshold: %d', out );

C APIs

Usage

TODO

TODO

TODO.

TODO

TODO

TODO

Examples

TODO
Did you find this page helpful?