Skip to content

Commit 765de9c

Browse files
committed
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 ---
1 parent 5cdd8fd commit 765de9c

File tree

7 files changed

+20
-45
lines changed

7 files changed

+20
-45
lines changed

lib/node_modules/@stdlib/lapack/base/dlapy2/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020

2121
# dlapy2
2222

23-
> LAPACK routine to calculate `sqrt( x^2 + y^2 )` in a manner which doesn't cause unnecessary overflow.
23+
> LAPACK routine to calculate `sqrt(x^2 + y^2)` in a manner which doesn't cause unnecessary overflow.
2424
2525
<section class="usage">
2626

@@ -32,7 +32,7 @@ var dlapy2 = require( '@stdlib/lapack/base/dlapy2' );
3232

3333
#### dlapy2( x, y )
3434

35-
Calculate `sqrt( x^2 + y^2 )` in a manner which doesn't cause unnecessary overflow.
35+
Calculate `sqrt(x^2 + y^2)` in a manner which doesn't cause unnecessary overflow.
3636

3737
```javascript
3838
var out = dlapy2( 3.0, 4.0 );
@@ -41,8 +41,8 @@ var out = dlapy2( 3.0, 4.0 );
4141

4242
The function has the following parameters:
4343

44-
- **x**: input number.
45-
- **y**: input number.
44+
- **x**: first input number.
45+
- **y**: second input number.
4646

4747
</section>
4848

lib/node_modules/@stdlib/lapack/base/dlapy2/docs/repl.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11

22
{{alias}}( x, y )
3-
Returns sqrt( x^2 + y^2 ) in a manner which doesn't cause unnecessary
3+
Returns `sqrt(x^2 + y^2)` in a manner which doesn't cause unnecessary
44
overflow.
55

6-
If either argument is `NaN` and the other argument is not `+-Infinity`,
7-
the function returns `NaN`.
8-
96
Parameters
107
----------
118
x: number
@@ -17,14 +14,12 @@
1714
Returns
1815
-------
1916
out: number
20-
Sqrt( x^2 + y^2 ).
17+
Square root of sum of squares.
2118

2219
Examples
2320
--------
2421
> var h = {{alias}}( -5.0, 12.0 )
2522
13.0
26-
> h = {{alias}}( NaN, 12.0 )
27-
NaN
2823
> h = {{alias}}( -0.0, -0.0 )
2924
0.0
3025

lib/node_modules/@stdlib/lapack/base/dlapy2/docs/types/index.d.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,17 @@
1919
// TypeScript Version: 4.1
2020

2121
/**
22-
* LAPACK routine to calculate sqrt( x^2 + y^2 ) in a manner which doesn't cause unnecessary overflow.
22+
* LAPACK routine to calculate `sqrt(x^2 + y^2)` in a manner which doesn't cause unnecessary overflow.
2323
*
24-
* @param x - number
25-
* @param y - number
26-
* @returns sqrt( x^2 + y^2 )
24+
* @param x - first input number
25+
* @param y - second input number
26+
* @returns `sqrt(x^2 + y^2)`
2727
*
2828
* @example
2929
* var h = dlapy2( -5.0, 12.0 );
3030
* // returns 13.0
3131
*
3232
* @example
33-
* var h = dlapy2( NaN, 12.0 );
34-
* // returns NaN
35-
*
36-
* @example
3733
* var h = dlapy2( -0.0, -0.0 );
3834
* // returns 0.0
3935
*/

lib/node_modules/@stdlib/lapack/base/dlapy2/lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
'use strict';
2020

2121
/**
22-
* LAPACK routine to calculate sqrt( x^2 + y^2 ) in a manner which doesn't cause unnecessary overflow.
22+
* LAPACK routine to calculate `sqrt(x^2 + y^2)` in a manner which doesn't cause unnecessary overflow.
2323
*
2424
* @module @stdlib/lapack/base/dlapy2
2525
*
2626
* @example
2727
* var dlapy2 = require( '@stdlib/lapack/base/dlapy2' );
2828
*
2929
* var out = dlapy2( 3.0, 4.0 );
30-
* // returns 5
30+
* // returns 5.0
3131
*/
3232

3333
// MODULES //

lib/node_modules/@stdlib/lapack/base/dlapy2/lib/main.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ var pow = require( '@stdlib/math/base/special/pow' );
3030
// MAIN //
3131

3232
/**
33-
* Returns sqrt( x^2 + y^2 ) in a manner which doesn't cause unnecessary overflow.
33+
* Returns `sqrt(x^2 + y^2)` in a manner which doesn't cause unnecessary overflow.
3434
*
3535
* @private
36-
* @param {number} x - input number
37-
* @param {number} y - input number
38-
* @returns {number} sqrt( x^2 + y^2 )
36+
* @param {number} x - first input number
37+
* @param {number} y - second input number
38+
* @returns {number} `sqrt(x^2 + y^2)`
3939
*
4040
* @example
41-
* var out = dlapy2( 3.0, 4.0, );
41+
* var out = dlapy2( 3.0, 4.0 );
4242
* // returns 5.0
4343
*/
4444
function dlapy2( x, y ) {

lib/node_modules/@stdlib/lapack/base/dlapy2/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@stdlib/lapack/base/dlapy2",
33
"version": "0.0.0",
4-
"description": "LAPACK routine to calculate sqrt( x^2 + y^2 ) in a manner which doesn't cause unnecessary overflow.",
4+
"description": "LAPACK routine to calculate `sqrt(x^2 + y^2)` in a manner which doesn't cause unnecessary overflow.",
55
"license": "Apache-2.0",
66
"author": {
77
"name": "The Stdlib Authors",

lib/node_modules/@stdlib/lapack/base/dlapy2/test/test.js

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ var EPS = require( '@stdlib/constants/float64/eps' );
2626
var abs = require( '@stdlib/math/base/special/abs' );
2727
var sqrt = require( '@stdlib/math/base/special/sqrt' );
2828
var pow = require( '@stdlib/math/base/special/pow' );
29-
var isnan = require( '@stdlib/math/base/assert/is-nan' );
3029
var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );
3130
var dlapy2 = require( './../lib' );
3231

@@ -44,21 +43,6 @@ tape( 'main export is a function', function test( t ) {
4443
t.end();
4544
});
4645

47-
tape( 'the function returns `NaN` if either argument is `NaN` but not `+-infinity`', function test( t ) {
48-
var h;
49-
50-
h = dlapy2( NaN, 3.14 );
51-
t.strictEqual( isnan( h ), true, 'returns expected value' );
52-
53-
h = dlapy2( 3.14, NaN );
54-
t.strictEqual( isnan( h ), true, 'returns expected value' );
55-
56-
h = dlapy2( NaN, NaN );
57-
t.strictEqual( isnan( h ), true, 'returns expected value' );
58-
59-
t.end();
60-
});
61-
6246
tape( 'the function returns `+0` if both arguments are `+-0`', function test( t ) {
6347
var h;
6448

@@ -125,7 +109,7 @@ tape( 'the function avoids overflow', function test( t ) {
125109
t.strictEqual( h, PINF, 'returns expected value' );
126110

127111
h = dlapy2( 1.0e308, 1.0e308 );
128-
t.strictEqual( h, 1.4142135623730951e308, 'avoids overflow' );
112+
t.strictEqual( h, 1.4142135623730951e308, 'returns expected value' );
129113

130114
t.end();
131115
});
@@ -137,7 +121,7 @@ tape( 'the function avoids underflow', function test( t ) {
137121
t.strictEqual( h, 0.0, 'returns 0' );
138122

139123
h = dlapy2( 1.0e-200, 1.0e-200 );
140-
t.strictEqual( h, 1.414213562373095e-200, 'avoids underflow' );
124+
t.strictEqual( h, 1.414213562373095e-200, 'returns expected value' );
141125

142126
t.end();
143127
});

0 commit comments

Comments
 (0)