From 9d4183c999ea829b6551f0c1e4eb175535adc903 Mon Sep 17 00:00:00 2001 From: Payal Goswami Date: Sun, 11 Jan 2026 08:27:33 +0000 Subject: [PATCH] test: add odd-function property test for sinh --- 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 --- --- .../math/base/special/sinh/test/test.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/node_modules/@stdlib/math/base/special/sinh/test/test.js b/lib/node_modules/@stdlib/math/base/special/sinh/test/test.js index ac0a950fb12a..9792d792f499 100644 --- a/lib/node_modules/@stdlib/math/base/special/sinh/test/test.js +++ b/lib/node_modules/@stdlib/math/base/special/sinh/test/test.js @@ -49,6 +49,25 @@ tape( 'main export is a function', function test( t ) { t.end(); }); +tape( 'the function is an odd function', function test( t ) { + var x; + var i; + + x = [ + 1.0e-16, + 0.1, + 0.5, + 1.0, + 5.0, + 10.0 + ]; + + for ( i = 0; i < x.length; i++ ) { + t.strictEqual( sinh( -x[ i ] ), -sinh( x[ i ] ), 'returns -sinh(x) for x = ' + x[ i ] ); + } + t.end(); +}); + tape( 'the function computes the hyperbolic sine', function test( t ) { var expected; var delta;