From 6fbb66a8870cc20c1130b806e40e73d7e0730d14 Mon Sep 17 00:00:00 2001 From: Aayush Khanna Date: Sat, 31 May 2025 12:50:10 +0000 Subject: [PATCH 01/12] feat: add lapack/base/dlapy3 --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../@stdlib/lapack/base/dlapy3/README.md | 175 ++++++++++++++++++ .../lapack/base/dlapy3/benchmark/benchmark.js | 58 ++++++ .../@stdlib/lapack/base/dlapy3/docs/repl.txt | 35 ++++ .../lapack/base/dlapy3/docs/types/index.d.ts | 46 +++++ .../lapack/base/dlapy3/docs/types/test.ts | 64 +++++++ .../lapack/base/dlapy3/examples/index.js | 32 ++++ .../@stdlib/lapack/base/dlapy3/lib/index.js | 40 ++++ .../@stdlib/lapack/base/dlapy3/lib/main.js | 69 +++++++ .../@stdlib/lapack/base/dlapy3/package.json | 69 +++++++ 9 files changed, 588 insertions(+) create mode 100644 lib/node_modules/@stdlib/lapack/base/dlapy3/README.md create mode 100644 lib/node_modules/@stdlib/lapack/base/dlapy3/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlapy3/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/lapack/base/dlapy3/examples/index.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlapy3/lib/index.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlapy3/package.json diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/README.md b/lib/node_modules/@stdlib/lapack/base/dlapy3/README.md new file mode 100644 index 000000000000..a25d55201e9a --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/README.md @@ -0,0 +1,175 @@ + + +# dlapy3 + +> LAPACK routine to calculate `sqrt( x^2 + y^2 + z^2 )` in a manner which doesn't cause unnecessary overflow. + +
+ +## Usage + +```javascript +var dlapy3 = require( '@stdlib/lapack/base/dlapy3' ); +``` + +#### dlapy3( x, y, z ) + +Calculate `sqrt( x^2 + y^2 + z^2 )` in a manner which doesn't cause unnecessary overflow. + +```javascript +var out = dlapy3( 3.0, 4.0, 12.0 ); +// returns 13.0 +``` + +The function has the following parameters: + +- **x**: input number. +- **y**: input number. +- **z**: input number. + +
+ + + +
+ +## Notes + +- `dlapy3()` corresponds to the [LAPACK][LAPACK] function [`dlapy3`][lapack-dlapy3]. + +
+ + + +
+ +## Examples + + + +```javascript +var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var dlapy3 = require( '@stdlib/lapack/base/dlapy3' ); + +var opts = { + 'dtype': 'float64' +}; +var x = discreteUniform( 100, -50, 50, opts ); +var y = discreteUniform( 100, -50, 50, opts ); +var z = discreteUniform( 100, -50, 50, opts ); + +logEachMap( 'dlapy3( %d, %d, %d ) = %0.4f', x, y, z, dlapy3 ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +TODO +``` + +#### TODO + +TODO. + +```c +TODO +``` + +TODO + +```c +TODO +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +TODO +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/benchmark/benchmark.js b/lib/node_modules/@stdlib/lapack/base/dlapy3/benchmark/benchmark.js new file mode 100644 index 000000000000..b1540f81c9e6 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/benchmark/benchmark.js @@ -0,0 +1,58 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var pkg = require( './../package.json' ).name; +var dlapy3 = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var len; + var t; + var x; + var y; + var z; + var i; + + len = 100; + x = uniform( len, -50, 50 ); + y = uniform( len, -50, 50 ); + z = uniform( len, -50, 50 ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + t = dlapy3( x[ i % len ], y[ i % len ], z[ i % len ] ); + if ( isnan( t ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( t ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/repl.txt b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/repl.txt new file mode 100644 index 000000000000..d93ff9bab3f2 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/repl.txt @@ -0,0 +1,35 @@ + +{{alias}}( x, y, z ) + Returns sqrt( x^2 + y^2 + z^2 ) in a manner which doesn't cause unnecessary + overflow. + + If either argument is `NaN` and the other argument is not `+-Infinity`, + the function returns `NaN`. + + Parameters + ---------- + x: number + First number. + + y: number + Second number. + + z: number + Third number. + + Returns + ------- + out: number + Sqrt( x^2 + y^2 + z^2 ). + + Examples + -------- + > var h = {{alias}}( 3.0, 4.0, 12.0 ) + 13.0 + > h = {{alias}}( NaN, 12.0, 0.0 ) + NaN + > h = {{alias}}( -0.0, -0.0, 0.0 ) + 0.0 + + See Also + -------- diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/index.d.ts b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/index.d.ts new file mode 100644 index 000000000000..fab1aa5acd52 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/index.d.ts @@ -0,0 +1,46 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* LAPACK routine to calculate sqrt( x^2 + y^2 + z^2 ) in a manner which doesn't cause unnecessary overflow. +* +* @param x - input number +* @param y - input number +* @param z - input number +* @returns sqrt( x^2 + y^2 + z^2 ) +* +* @example +* var h = dlapy3( 3.0, 4.0, 12.0 ); +* // returns 13.0 +* +* @example +* var h = dlapy3( NaN, 12.0 ); +* // returns NaN +* +* @example +* var h = dlapy3( -0.0, -0.0, 0.0 ); +* // returns 0.0 +*/ +declare function dlapy3( x: number, y: number, z: number ): number; + + +// EXPORTS // + +export = dlapy3; diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/test.ts b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/test.ts new file mode 100644 index 000000000000..eb2f44da6e2a --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/test.ts @@ -0,0 +1,64 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import dlapy3 = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + dlapy3( 8, 2, 10 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided values other than two numbers... +{ + dlapy3( true, 3, 1 ); // $ExpectError + dlapy3( false, 2, 1 ); // $ExpectError + dlapy3( '5', 1, 1 ); // $ExpectError + dlapy3( [], 1, 1 ); // $ExpectError + dlapy3( {}, 2, 1 ); // $ExpectError + dlapy3( ( x: number ): number => x, 2, 1 ); // $ExpectError + + dlapy3( 9, true, 1 ); // $ExpectError + dlapy3( 9, false, 1 ); // $ExpectError + dlapy3( 5, '5', 1 ); // $ExpectError + dlapy3( 8, [], 1 ); // $ExpectError + dlapy3( 9, {}, 1 ); // $ExpectError + dlapy3( 8, ( x: number ): number => x, 1 ); // $ExpectError + + dlapy3( 9, 1, true ); // $ExpectError + dlapy3( 9, 1, false ); // $ExpectError + dlapy3( 5, 1, '5' ); // $ExpectError + dlapy3( 8, 1, [] ); // $ExpectError + dlapy3( 9, 1, {} ); // $ExpectError + dlapy3( 8, 1, ( x: number ): number => x ); // $ExpectError + + dlapy3( [], true, void 0 ); // $ExpectError + dlapy3( {}, false, [] ); // $ExpectError + dlapy3( false, '5', {} ); // $ExpectError + dlapy3( {}, [], 'beep' ); // $ExpectError + dlapy3( '5', ( x: number ): number => x, [] ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + dlapy3(); // $ExpectError + dlapy3( 3 ); // $ExpectError + dlapy3( 3, 5 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/examples/index.js b/lib/node_modules/@stdlib/lapack/base/dlapy3/examples/index.js new file mode 100644 index 000000000000..9db81db83ecc --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/examples/index.js @@ -0,0 +1,32 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var dlapy3 = require( './../lib' ); + +var opts = { + 'dtype': 'float64' +}; +var x = discreteUniform( 100, -50, 50, opts ); +var y = discreteUniform( 100, -50, 50, opts ); +var z = discreteUniform( 100, -50, 50, opts ); + +logEachMap( 'dlapy3( %d, %d, %d ) = %0.4f', x, y, z, dlapy3 ); diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/index.js b/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/index.js new file mode 100644 index 000000000000..cfbbb97ed7e3 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/index.js @@ -0,0 +1,40 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* LAPACK routine to calculate sqrt( x^2 + y^2 + z^2 ) in a manner which doesn't cause unnecessary overflow. +* +* @module @stdlib/lapack/base/dlapy3 +* +* @example +* var dlapy3 = require( '@stdlib/lapack/base/dlapy3' ); +* +* var out = dlapy3( 3.0, 4.0, 12.0 ); +* // returns 13.0 +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js b/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js new file mode 100644 index 000000000000..3a6cc25d1c1d --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js @@ -0,0 +1,69 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var abs = require( '@stdlib/math/base/special/abs' ); +var dlamch = require( '@stdlib/lapack/base/dlamch' ); +var max = require( '@stdlib/math/base/special/maxn' ); +var sqrt = require( '@stdlib/math/base/special/sqrt' ); +var pow = require( '@stdlib/math/base/special/pow' ); + + +// MAIN // + +/** +* Returns sqrt( x^2 + y^2 + z^2 ) in a manner which doesn't cause unnecessary overflow. +* +* @private +* @param {number} x - input number +* @param {number} y - input number +* @param {number} z - input number +* @returns {number} sqrt( x^2 + y^2 + z^2 ) +* +* @example +* var out = dlapy3( 3.0, 4.0, 12.0 ); +* // returns 13.0 +*/ +function dlapy3( x, y, z ) { + var hugeval; + var xabs; + var yabs; + var zabs; + var w; + + hugeval = dlamch( 'O' ); + xabs = abs( x ); + yabs = abs( y ); + zabs = abs( z ); + + w = max( xabs, yabs, zabs ); + + if ( w === 0.0 || w > hugeval ) { + return xabs + yabs + zabs; + } + + return w * sqrt( pow( xabs / w, 2.0 ) + pow( yabs / w, 2.0 ) + pow( zabs / w, 2.0 ) ); // eslint-disable-line max-len +} + + +// EXPORTS // + +module.exports = dlapy3; diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/package.json b/lib/node_modules/@stdlib/lapack/base/dlapy3/package.json new file mode 100644 index 000000000000..f3197cd70b88 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/package.json @@ -0,0 +1,69 @@ +{ + "name": "@stdlib/lapack/base/dlapy3", + "version": "0.0.0", + "description": "LAPACK routine to calculate sqrt( x^2 + y^2 + z^2 ) in a manner which doesn't cause unnecessary overflow.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "mathematics", + "math", + "lapack", + "dlapy3", + "copy", + "linear", + "algebra", + "subroutines", + "array", + "ndarray", + "matrix", + "float64", + "double", + "float64array" + ] +} From 01e7ade93b4a8980da0474d1e3785e6ecb9a308f Mon Sep 17 00:00:00 2001 From: Aayush Khanna Date: Sat, 31 May 2025 13:01:38 +0000 Subject: [PATCH 02/12] test: add tests --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/lapack/base/dlapy3/test/test.js | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js b/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js new file mode 100644 index 000000000000..759c1d098879 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js @@ -0,0 +1,113 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var PINF = require( '@stdlib/constants/float64/pinf' ); +var sqrt = require( '@stdlib/math/base/special/sqrt' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' ); +var dlapy3 = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof dlapy3, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns `NaN` if either argument is `NaN` but not `+-infinity`', function test( t ) { + var h; + + h = dlapy3( NaN, 3.14, 2.0 ); + t.strictEqual( isnan( h ), true, 'returns expected value' ); + + h = dlapy3( 3.14, NaN, 2.0 ); + t.strictEqual( isnan( h ), true, 'returns expected value' ); + + h = dlapy3( 3.14, 2.0, NaN ); + t.strictEqual( isnan( h ), true, 'returns expected value' ); + + h = dlapy3( NaN, NaN, NaN ); + t.strictEqual( isnan( h ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns `+0` if both arguments are `+-0`', function test( t ) { + var h; + + h = dlapy3( +0.0, +0.0, +0.0 ); + t.strictEqual( isPositiveZero( h ), true, 'returns expected value' ); + + h = dlapy3( -0.0, +0.0, -0.0 ); + t.strictEqual( isPositiveZero( h ), true, 'returns expected value' ); + + h = dlapy3( +0.0, -0.0, 0.0 ); + t.strictEqual( isPositiveZero( h ), true, 'returns expected value' ); + + h = dlapy3( -0.0, -0.0, -0.0 ); + t.strictEqual( isPositiveZero( h ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function computes the euclidian norm', function test( t ) { + var h; + + h = dlapy3( 1234.0, 7863.0, 1298.0 ); + t.strictEqual( h, 8064.3864614736813, 'returns expected value' ); + + h = dlapy3( 7.0, 9.0, 12.0 ); + t.strictEqual( h, 16.552945357246848, 'returns expected value' ); + + h = dlapy3( 3.0, 4.0, 12.0 ); + t.strictEqual( h, 13.0, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function avoids overflow', function test( t ) { + var h; + + h = sqrt( pow( 1.0e308, 2 ) + pow( 1.0e308, 2 ) + pow( 1.0e308, 2 ) ); + t.strictEqual( h, PINF, 'returns expected value' ); + + h = dlapy3( 1.0e308, 1.0e308, 1.0e308 ); + t.strictEqual( h, 1.7320508075688772e+308, 'avoids overflow' ); + + t.end(); +}); + +tape( 'the function avoids underflow', function test( t ) { + var h; + + h = sqrt( pow( 1.0e-200, 2 ) + pow( 1e-200, 2 ) + pow( 1e-200, 2 ) ); + t.strictEqual( h, 0.0, 'returns 0' ); + + h = dlapy3( 1.0e-200, 1.0e-200, 1.0e-200 ); + t.strictEqual( h, 1.7320508075688772e-200, 'avoids underflow' ); + + t.end(); +}); From 32f409826732a43955401a0265b8755b8dccb090 Mon Sep 17 00:00:00 2001 From: Aayush Khanna Date: Mon, 2 Jun 2025 05:22:17 +0000 Subject: [PATCH 03/12] chore: code review --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/lapack/base/dlapy3/README.md | 10 +++++----- .../@stdlib/lapack/base/dlapy3/docs/repl.txt | 17 ++++++----------- .../lapack/base/dlapy3/docs/types/index.d.ts | 14 +++++--------- .../@stdlib/lapack/base/dlapy3/lib/index.js | 2 +- .../@stdlib/lapack/base/dlapy3/lib/main.js | 14 +++++++------- .../@stdlib/lapack/base/dlapy3/package.json | 2 +- .../@stdlib/lapack/base/dlapy3/test/test.js | 19 ------------------- 7 files changed, 25 insertions(+), 53 deletions(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/README.md b/lib/node_modules/@stdlib/lapack/base/dlapy3/README.md index a25d55201e9a..8348d403836f 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/README.md +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/README.md @@ -20,7 +20,7 @@ limitations under the License. # dlapy3 -> LAPACK routine to calculate `sqrt( x^2 + y^2 + z^2 )` in a manner which doesn't cause unnecessary overflow. +> LAPACK routine to calculate `sqrt(x^2 + y^2 + z^2)` in a manner which doesn't cause unnecessary overflow.
@@ -32,7 +32,7 @@ var dlapy3 = require( '@stdlib/lapack/base/dlapy3' ); #### dlapy3( x, y, z ) -Calculate `sqrt( x^2 + y^2 + z^2 )` in a manner which doesn't cause unnecessary overflow. +Computes `sqrt(x^2 + y^2 + z^2)` in a manner which doesn't cause unnecessary overflow. ```javascript var out = dlapy3( 3.0, 4.0, 12.0 ); @@ -41,9 +41,9 @@ var out = dlapy3( 3.0, 4.0, 12.0 ); The function has the following parameters: -- **x**: input number. -- **y**: input number. -- **z**: input number. +- **x**: first input number. +- **y**: second input number. +- **z**: third input number.
diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/repl.txt b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/repl.txt index d93ff9bab3f2..0a6cdbbbf931 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/repl.txt +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/repl.txt @@ -1,33 +1,28 @@ {{alias}}( x, y, z ) - Returns sqrt( x^2 + y^2 + z^2 ) in a manner which doesn't cause unnecessary - overflow. - - If either argument is `NaN` and the other argument is not `+-Infinity`, - the function returns `NaN`. + Computes `sqrt( x^2 + y^2 + z^2 )` in a manner which doesn't cause + unnecessary overflow. Parameters ---------- x: number - First number. + First input number. y: number - Second number. + Second input number. z: number - Third number. + Third input number. Returns ------- out: number - Sqrt( x^2 + y^2 + z^2 ). + Square root of sum of squares of all input numbers. Examples -------- > var h = {{alias}}( 3.0, 4.0, 12.0 ) 13.0 - > h = {{alias}}( NaN, 12.0, 0.0 ) - NaN > h = {{alias}}( -0.0, -0.0, 0.0 ) 0.0 diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/index.d.ts b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/index.d.ts index fab1aa5acd52..29f553334a2a 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/index.d.ts @@ -19,22 +19,18 @@ // TypeScript Version: 4.1 /** -* LAPACK routine to calculate sqrt( x^2 + y^2 + z^2 ) in a manner which doesn't cause unnecessary overflow. +* LAPACK routine to calculate `sqrt( x^2 + y^2 + z^2 )` in a manner which doesn't cause unnecessary overflow. * -* @param x - input number -* @param y - input number -* @param z - input number -* @returns sqrt( x^2 + y^2 + z^2 ) +* @param x - first input number +* @param y - second input number +* @param z - third input number +* @returns `sqrt(x^2 + y^2 + z^2)` * * @example * var h = dlapy3( 3.0, 4.0, 12.0 ); * // returns 13.0 * * @example -* var h = dlapy3( NaN, 12.0 ); -* // returns NaN -* -* @example * var h = dlapy3( -0.0, -0.0, 0.0 ); * // returns 0.0 */ diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/index.js b/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/index.js index cfbbb97ed7e3..39d1f9d75cc9 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/index.js +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/index.js @@ -19,7 +19,7 @@ 'use strict'; /** -* LAPACK routine to calculate sqrt( x^2 + y^2 + z^2 ) in a manner which doesn't cause unnecessary overflow. +* LAPACK routine to calculate `sqrt(x^2 + y^2 + z^2)` in a manner which doesn't cause unnecessary overflow. * * @module @stdlib/lapack/base/dlapy3 * diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js b/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js index 3a6cc25d1c1d..93c3268852ca 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js @@ -24,19 +24,19 @@ var abs = require( '@stdlib/math/base/special/abs' ); var dlamch = require( '@stdlib/lapack/base/dlamch' ); var max = require( '@stdlib/math/base/special/maxn' ); var sqrt = require( '@stdlib/math/base/special/sqrt' ); -var pow = require( '@stdlib/math/base/special/pow' ); +var abs2 = require( '@stdlib/math/base/special/abs2' ); // MAIN // /** -* Returns sqrt( x^2 + y^2 + z^2 ) in a manner which doesn't cause unnecessary overflow. +* Returns `sqrt( x^2 + y^2 + z^2 )` in a manner which doesn't cause unnecessary overflow. * * @private -* @param {number} x - input number -* @param {number} y - input number -* @param {number} z - input number -* @returns {number} sqrt( x^2 + y^2 + z^2 ) +* @param {number} x - first input number +* @param {number} y - second input number +* @param {number} z - third input number +* @returns {number} `sqrt(x^2 + y^2 + z^2)` * * @example * var out = dlapy3( 3.0, 4.0, 12.0 ); @@ -60,7 +60,7 @@ function dlapy3( x, y, z ) { return xabs + yabs + zabs; } - return w * sqrt( pow( xabs / w, 2.0 ) + pow( yabs / w, 2.0 ) + pow( zabs / w, 2.0 ) ); // eslint-disable-line max-len + return w * sqrt( abs2( xabs / w ) + abs2( yabs / w ) + abs2( zabs / w ) ); } diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/package.json b/lib/node_modules/@stdlib/lapack/base/dlapy3/package.json index f3197cd70b88..3e103f68ca3e 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/package.json +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/package.json @@ -1,7 +1,7 @@ { "name": "@stdlib/lapack/base/dlapy3", "version": "0.0.0", - "description": "LAPACK routine to calculate sqrt( x^2 + y^2 + z^2 ) in a manner which doesn't cause unnecessary overflow.", + "description": "LAPACK routine to calculate sqrt(x^2 + y^2 + z^2) in a manner which doesn't cause unnecessary overflow.", "license": "Apache-2.0", "author": { "name": "The Stdlib Authors", diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js b/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js index 759c1d098879..4f1de5110991 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js @@ -24,7 +24,6 @@ var tape = require( 'tape' ); var PINF = require( '@stdlib/constants/float64/pinf' ); var sqrt = require( '@stdlib/math/base/special/sqrt' ); var pow = require( '@stdlib/math/base/special/pow' ); -var isnan = require( '@stdlib/math/base/assert/is-nan' ); var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' ); var dlapy3 = require( './../lib' ); @@ -37,24 +36,6 @@ tape( 'main export is a function', function test( t ) { t.end(); }); -tape( 'the function returns `NaN` if either argument is `NaN` but not `+-infinity`', function test( t ) { - var h; - - h = dlapy3( NaN, 3.14, 2.0 ); - t.strictEqual( isnan( h ), true, 'returns expected value' ); - - h = dlapy3( 3.14, NaN, 2.0 ); - t.strictEqual( isnan( h ), true, 'returns expected value' ); - - h = dlapy3( 3.14, 2.0, NaN ); - t.strictEqual( isnan( h ), true, 'returns expected value' ); - - h = dlapy3( NaN, NaN, NaN ); - t.strictEqual( isnan( h ), true, 'returns expected value' ); - - t.end(); -}); - tape( 'the function returns `+0` if both arguments are `+-0`', function test( t ) { var h; From f608240262e3d595dcc8eb05e152decffd9e8487 Mon Sep 17 00:00:00 2001 From: Aayush Khanna Date: Mon, 2 Jun 2025 05:28:30 +0000 Subject: [PATCH 04/12] chore: code review --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js b/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js index 93c3268852ca..cf2f58555ce0 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js @@ -30,7 +30,7 @@ var abs2 = require( '@stdlib/math/base/special/abs2' ); // MAIN // /** -* Returns `sqrt( x^2 + y^2 + z^2 )` in a manner which doesn't cause unnecessary overflow. +* Computes `sqrt(x^2 + y^2 + z^2)` in a manner which doesn't cause unnecessary overflow. * * @private * @param {number} x - first input number From 76a2f8e62ec0365ff812cf471e7cf780b7d79d38 Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 2 Jun 2025 15:57:47 -0700 Subject: [PATCH 05/12] Apply suggestions from code review Signed-off-by: Athan --- lib/node_modules/@stdlib/lapack/base/dlapy3/docs/repl.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/repl.txt b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/repl.txt index 0a6cdbbbf931..891ae73c847b 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/repl.txt +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/repl.txt @@ -1,6 +1,6 @@ {{alias}}( x, y, z ) - Computes `sqrt( x^2 + y^2 + z^2 )` in a manner which doesn't cause + Computes `sqrt(x^2 + y^2 + z^2)` in a manner which doesn't cause unnecessary overflow. Parameters @@ -17,7 +17,7 @@ Returns ------- out: number - Square root of sum of squares of all input numbers. + Square root of sum of squares. Examples -------- From 72f4d994c97e12ea8481df03a56c19c26fc2129e Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 2 Jun 2025 16:01:15 -0700 Subject: [PATCH 06/12] style: remove empty line Signed-off-by: Athan --- lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js b/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js index cf2f58555ce0..c4e0c3d1f77c 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js @@ -59,7 +59,6 @@ function dlapy3( x, y, z ) { if ( w === 0.0 || w > hugeval ) { return xabs + yabs + zabs; } - return w * sqrt( abs2( xabs / w ) + abs2( yabs / w ) + abs2( zabs / w ) ); } From 3502369414644c2a580ea9235cbf94695866c23c Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 2 Jun 2025 16:01:28 -0700 Subject: [PATCH 07/12] docs: update comment Signed-off-by: Athan --- lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/test.ts b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/test.ts index eb2f44da6e2a..be1d768cc47b 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/test.ts +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/test.ts @@ -26,7 +26,7 @@ import dlapy3 = require( './index' ); dlapy3( 8, 2, 10 ); // $ExpectType number } -// The compiler throws an error if the function is provided values other than two numbers... +// The compiler throws an error if the function is provided values other than three numbers... { dlapy3( true, 3, 1 ); // $ExpectError dlapy3( false, 2, 1 ); // $ExpectError From 46726f9e62c7c2634d61174c79de6dcab8db5718 Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 2 Jun 2025 16:01:39 -0700 Subject: [PATCH 08/12] style: remove spaces Signed-off-by: Athan --- .../@stdlib/lapack/base/dlapy3/docs/types/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/index.d.ts b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/index.d.ts index 29f553334a2a..df29afac6093 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/docs/types/index.d.ts @@ -19,7 +19,7 @@ // TypeScript Version: 4.1 /** -* LAPACK routine to calculate `sqrt( x^2 + y^2 + z^2 )` in a manner which doesn't cause unnecessary overflow. +* LAPACK routine to calculate `sqrt(x^2 + y^2 + z^2)` in a manner which doesn't cause unnecessary overflow. * * @param x - first input number * @param y - second input number From 7f26f336d057c950a8a01778b1dcf81d13ecf82f Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 2 Jun 2025 16:02:19 -0700 Subject: [PATCH 09/12] docs: remove annotation Signed-off-by: Athan --- lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js b/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js index c4e0c3d1f77c..40c9c76d5ff0 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/lib/main.js @@ -32,7 +32,6 @@ var abs2 = require( '@stdlib/math/base/special/abs2' ); /** * Computes `sqrt(x^2 + y^2 + z^2)` in a manner which doesn't cause unnecessary overflow. * -* @private * @param {number} x - first input number * @param {number} y - second input number * @param {number} z - third input number From 0ba129154e3ada53964aca483763b905a9d7277a Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 2 Jun 2025 16:07:48 -0700 Subject: [PATCH 10/12] test: update messages Signed-off-by: Athan --- lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js b/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js index 4f1de5110991..72862788f56e 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js @@ -76,7 +76,7 @@ tape( 'the function avoids overflow', function test( t ) { t.strictEqual( h, PINF, 'returns expected value' ); h = dlapy3( 1.0e308, 1.0e308, 1.0e308 ); - t.strictEqual( h, 1.7320508075688772e+308, 'avoids overflow' ); + t.strictEqual( h, 1.7320508075688772e+308, 'returns expected value' ); t.end(); }); @@ -85,10 +85,10 @@ tape( 'the function avoids underflow', function test( t ) { var h; h = sqrt( pow( 1.0e-200, 2 ) + pow( 1e-200, 2 ) + pow( 1e-200, 2 ) ); - t.strictEqual( h, 0.0, 'returns 0' ); + t.strictEqual( h, 0.0, 'returns expected value' ); h = dlapy3( 1.0e-200, 1.0e-200, 1.0e-200 ); - t.strictEqual( h, 1.7320508075688772e-200, 'avoids underflow' ); + t.strictEqual( h, 1.7320508075688772e-200, 'returns expected value' ); t.end(); }); From 56cbbc59def0f09f81c380ca77c3ed8ec864b08b Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 2 Jun 2025 16:09:52 -0700 Subject: [PATCH 11/12] test: add `NaN` tests Signed-off-by: Athan --- .../@stdlib/lapack/base/dlapy3/test/test.js | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js b/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js index 72862788f56e..3358c694d91a 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js @@ -25,6 +25,7 @@ var PINF = require( '@stdlib/constants/float64/pinf' ); var sqrt = require( '@stdlib/math/base/special/sqrt' ); var pow = require( '@stdlib/math/base/special/pow' ); var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); var dlapy3 = require( './../lib' ); @@ -36,7 +37,7 @@ tape( 'main export is a function', function test( t ) { t.end(); }); -tape( 'the function returns `+0` if both arguments are `+-0`', function test( t ) { +tape( 'the function returns `+0` if all arguments are `+-0`', function test( t ) { var h; h = dlapy3( +0.0, +0.0, +0.0 ); @@ -54,6 +55,33 @@ tape( 'the function returns `+0` if both arguments are `+-0`', function test( t t.end(); }); +tape( 'the function returns `NaN` if one or more arguments is `NaN`', function test( t ) { + var h; + + h = dlapy3( NaN, 0.0, 0.0 ); + t.strictEqual( isnan( h ), true, 'returns expected value' ); + + h = dlapy3( 0.0, NaN, 0.0 ); + t.strictEqual( isnan( h ), true, 'returns expected value' ); + + h = dlapy3( 0.0, 0.0, NaN ); + t.strictEqual( isnan( h ), true, 'returns expected value' ); + + h = dlapy3( NaN, NaN, 0.0 ); + t.strictEqual( isnan( h ), true, 'returns expected value' ); + + h = dlapy3( NaN, 0.0, NaN ); + t.strictEqual( isnan( h ), true, 'returns expected value' ); + + h = dlapy3( 0.0, NaN, NaN ); + t.strictEqual( isnan( h ), true, 'returns expected value' ); + + h = dlapy3( NaN, NaN, NaN ); + t.strictEqual( isnan( h ), true, 'returns expected value' ); + + t.end(); +}); + tape( 'the function computes the euclidian norm', function test( t ) { var h; From 8e58487161263e7ca31cf87a427da51915c3b1a3 Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 2 Jun 2025 16:10:30 -0700 Subject: [PATCH 12/12] test: update description Signed-off-by: Athan --- lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js b/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js index 3358c694d91a..aea63ecd5d2f 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js +++ b/lib/node_modules/@stdlib/lapack/base/dlapy3/test/test.js @@ -82,7 +82,7 @@ tape( 'the function returns `NaN` if one or more arguments is `NaN`', function t t.end(); }); -tape( 'the function computes the euclidian norm', function test( t ) { +tape( 'the function computes the Euclidian norm', function test( t ) { var h; h = dlapy3( 1234.0, 7863.0, 1298.0 );