Skip to content

Commit 7798623

Browse files
committed
test: add even-function property test for cosh
--- 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 55030f9 commit 7798623

File tree

1 file changed

+19
-0
lines changed
  • lib/node_modules/@stdlib/math/base/special/cosh/test

1 file changed

+19
-0
lines changed

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,25 @@ tape( 'main export is a function', function test( t ) {
4444
t.end();
4545
});
4646

47+
tape( 'the function is an even function', function test( t ) {
48+
var x;
49+
var i;
50+
51+
x = [
52+
0.5,
53+
1.0,
54+
3.5,
55+
10.0,
56+
50.0,
57+
100.0
58+
];
59+
60+
for ( i = 0; i < x.length; i++ ) {
61+
t.strictEqual( cosh( x[ i ] ), cosh( -x[ i ] ), 'returns same value for ' + x[ i ] + ' and -' + x[ i ] );
62+
}
63+
t.end();
64+
});
65+
4766
tape( 'the function computes the hyperbolic cosine', function test( t ) {
4867
var expected;
4968
var delta;

0 commit comments

Comments
 (0)