output array
input value
output array
var Float64Array = require( `@stdlib/array/float64` );
var pow = require( `@stdlib/math/base/special/pow` );
var out = new Float64Array( 2 );
var v = normalize( out, 3.14e-319 );
// returns <Float64Array>[ 1.4141234400356668e-303, -52 ]
var bool = ( v === out );
// returns true
var out = normalize( [ 0.0, 0 ], 0.0 );
// returns [ 0.0, 0 ]
var out = normalize( [ 0.0, 0 ], Infinity );
// returns [ Infinity, 0 ]
var out = normalize( [ 0.0, 0 ], -Infinity );
// returns [ -Infinity, 0 ]
var out = normalize( [ 0.0, 0 ], NaN );
// returns [ NaN, 0 ]
Returns a normal number y
and exponent exp
satisfying \(x = y \cdot 2^\mathrm{exp}\).
input value
output array
var pow = require( `@stdlib/math/base/special/pow` );
var out = normalize( 3.14e-319 );
// returns [ 1.4141234400356668e-303, -52 ]
var y = out[ 0 ];
var exp = out[ 1 ];
var bool = ( y*pow(2.0,exp) === 3.14e-319 );
// returns true
var out = normalize( 0.0 );
// returns [ 0.0, 0 ]
var out = normalize( Infinity );
// returns [ Infinity, 0 ]
var out = normalize( -Infinity );
// returns [ -Infinity, 0 ]
var out = normalize( NaN );
// returns [ NaN, 0 ]
Returns a normal number
y
and exponentexp
satisfying \(x = y \cdot 2^\mathrm{exp}\).