Skip to content

Commit 5044c22

Browse files
committed
chore: increase test precision
--- 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: 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 ---
1 parent 8743d1b commit 5044c22

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

lib/node_modules/@stdlib/blas/base/dnrm2/test/test.dnrm2.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,20 @@ tape( 'the function calculates the L2-norm of a vector', function test( t ) {
9696

9797
x = new Float64Array( [ 1.0e150, 1.0e50, 1.0e150, 1.0e50 ] );
9898

99-
z = dnrm2( x.length, x, 1 );
100-
isApprox( t, z, 1.41421e150, 2.0 );
99+
x = new Float64Array( [ 1.0e150, 1.0e50, 1.0e150, 1.0e50 ] );
100+
101+
z = dnrm2( x.length, x, 1, 0 );
102+
isApprox( t, z, 1.4142135623730951e150, 1.0 );
101103

102104
x = new Float64Array( [ 1.0e-155, 1.0e50, 1.0e-155, 1.0e50 ] );
103105

104-
z = dnrm2( x.length, x, 1 );
105-
isApprox( t, z, 1.41421e50, 2.0 );
106+
z = dnrm2( x.length, x, 1, 0 );
107+
isApprox( t, z, 1.4142135623730951e50, 1.0 );
106108

107109
x = new Float64Array( [ 1.4e-154, 1.5e-154, 1.4e-154, 0.0 ] );
108110

109-
z = dnrm2( x.length, x, 1 );
110-
isApprox( t, z, 2.483948e-154, 2.0 );
111+
z = dnrm2( x.length, x, 1, 0 );
112+
isApprox( t, z, 2.4839480006885204e-154, 1.0 );
111113

112114
t.end();
113115
});

lib/node_modules/@stdlib/blas/base/dnrm2/test/test.dnrm2.native.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,18 @@ tape( 'the function calculates the L2-norm of a vector', opts, function test( t
105105

106106
x = new Float64Array( [ 1.0e150, 1.0e50, 1.0e150, 1.0e50 ] );
107107

108-
z = dnrm2( x.length, x, 1 );
109-
isApprox( t, z, 1.41421e150, 2.0 );
108+
z = dnrm2( x.length, x, 1, 0 );
109+
isApprox( t, z, 1.4142135623730951e150, 1.0 );
110110

111111
x = new Float64Array( [ 1.0e-155, 1.0e50, 1.0e-155, 1.0e50 ] );
112112

113-
z = dnrm2( x.length, x, 1 );
114-
isApprox( t, z, 1.41421e50, 2.0 );
113+
z = dnrm2( x.length, x, 1, 0 );
114+
isApprox( t, z, 1.4142135623730951e50, 1.0 );
115115

116116
x = new Float64Array( [ 1.4e-154, 1.5e-154, 1.4e-154, 0.0 ] );
117117

118-
z = dnrm2( x.length, x, 1 );
119-
isApprox( t, z, 2.483948e-154, 2.0 );
118+
z = dnrm2( x.length, x, 1, 0 );
119+
isApprox( t, z, 2.4839480006885204e-154, 1.0 );
120120

121121
t.end();
122122
});

lib/node_modules/@stdlib/blas/base/dnrm2/test/test.ndarray.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,17 @@ tape( 'the function calculates the L2-norm of a vector', function test( t ) {
9797
x = new Float64Array( [ 1.0e150, 1.0e50, 1.0e150, 1.0e50 ] );
9898

9999
z = dnrm2( x.length, x, 1, 0 );
100-
isApprox( t, z, 1.41421e150, 2.0 );
100+
isApprox( t, z, 1.4142135623730951e150, 1.0 );
101101

102102
x = new Float64Array( [ 1.0e-155, 1.0e50, 1.0e-155, 1.0e50 ] );
103103

104104
z = dnrm2( x.length, x, 1, 0 );
105-
isApprox( t, z, 1.41421e50, 2.0 );
105+
isApprox( t, z, 1.4142135623730951e50, 1.0 );
106106

107107
x = new Float64Array( [ 1.4e-154, 1.5e-154, 1.4e-154, 0.0 ] );
108108

109109
z = dnrm2( x.length, x, 1, 0 );
110-
isApprox( t, z, 2.483948e-154, 2.0 );
110+
isApprox( t, z, 2.4839480006885204e-154, 1.0 );
111111

112112
t.end();
113113
});

0 commit comments

Comments
 (0)