LAPACK routine to calculate
sqrt(x^2 + y^2)in a manner which doesn't cause unnecessary overflow.
var dlapy2 = require( '@stdlib/lapack/base/dlapy2' );Computes sqrt(x^2 + y^2) in a manner which doesn't cause unnecessary overflow.
var out = dlapy2( 3.0, 4.0 );
// returns 5.0The function has the following parameters:
- x: first input number.
- y: second input number.
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
var logEachMap = require( '@stdlib/console/log-each-map' );
var dlapy2 = require( '@stdlib/lapack/base/dlapy2' );
var opts = {
'dtype': 'float64'
};
var x = discreteUniform( 100, -50, 50, opts );
var y = discreteUniform( 100, -50, 50, opts );
logEachMap( 'dlapy2( %d, %d ) = %0.4f', x, y, dlapy2 );TODOTODO.
TODOTODO
TODOTODO