Skip to content

Commit fb7c47a

Browse files
committed
refactor: use helper functions for zero checks
--- 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 ---
1 parent f369d9d commit fb7c47a

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

lib/node_modules/@stdlib/math/base/special/acos/test/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' );
2525
var randu = require( '@stdlib/random/base/randu' );
2626
var abs = require( '@stdlib/math/base/special/abs' );
2727
var EPS = require( '@stdlib/constants/float64/eps' );
28+
var isPositiveZero = require( '@stdlib/assert/is-positive-zero' );
2829
var acos = require( './../lib' );
2930

3031

@@ -142,7 +143,6 @@ tape( 'the function returns `NaN` if provided a value greater than `+1`', functi
142143
});
143144

144145
tape( 'the function returns `0` if provided `1`', function test( t ) {
145-
var v = acos( 1.0 );
146-
t.equal( v, 0.0, 'returns expected value' );
146+
t.equal( isPositiveZero( acos( 1.0 ) ), true, 'returns expected value' );
147147
t.end();
148148
});

lib/node_modules/@stdlib/math/base/special/acos/test/test.native.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ var randu = require( '@stdlib/random/base/randu' );
2727
var tryRequire = require( '@stdlib/utils/try-require' );
2828
var abs = require( '@stdlib/math/base/special/abs' );
2929
var EPS = require( '@stdlib/constants/float64/eps' );
30+
var isPositiveZero = require( '@stdlib/assert/is-positive-zero' );
3031

3132

3233
// FIXTURES //
@@ -151,7 +152,6 @@ tape( 'the function returns `NaN` if provided a value greater than `+1`', opts,
151152
});
152153

153154
tape( 'the function returns `0` if provided `1`', opts, function test( t ) {
154-
var v = acos( 1.0 );
155-
t.equal( v, 0.0, 'returns expected value' );
155+
t.equal( isPositiveZero( acos( 1.0 ) ), true, 'returns expected value' );
156156
t.end();
157157
});

lib/node_modules/@stdlib/math/base/special/acosh/test/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' );
2525
var randu = require( '@stdlib/random/base/randu' );
2626
var EPS = require( '@stdlib/constants/float64/eps' );
2727
var abs = require( '@stdlib/math/base/special/abs' );
28+
var isPositiveZero = require( '@stdlib/assert/is-positive-zero' );
2829
var acosh = require( './../lib' );
2930

3031

@@ -158,7 +159,6 @@ tape( 'the function returns `NaN` if provided value less than `1`', function tes
158159
});
159160

160161
tape( 'the function returns `0` if provided `1`', function test( t ) {
161-
var v = acosh( 1.0 );
162-
t.equal( v, 0.0, 'returns expected value' );
162+
t.equal( isPositiveZero( acosh( 1.0 ) ), true, 'returns expected value' );
163163
t.end();
164164
});

lib/node_modules/@stdlib/math/base/special/acosh/test/test.native.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' );
2626
var randu = require( '@stdlib/random/base/randu' );
2727
var EPS = require( '@stdlib/constants/float64/eps' );
2828
var abs = require( '@stdlib/math/base/special/abs' );
29+
var isPositiveZero = require( '@stdlib/assert/is-positive-zero' );
2930
var tryRequire = require( '@stdlib/utils/try-require' );
3031

3132

@@ -167,7 +168,6 @@ tape( 'the function returns `NaN` if provided value less than `1`', opts, functi
167168
});
168169

169170
tape( 'the function returns `0` if provided `1`', opts, function test( t ) {
170-
var v = acosh( 1.0 );
171-
t.equal( v, 0.0, 'returns expected value' );
171+
t.equal( isPositiveZero( acosh( 1.0 ) ), true, 'returns expected value' );
172172
t.end();
173173
});

0 commit comments

Comments
 (0)