Skip to content

Commit f9e7a27

Browse files
committed
test: add tests for IEEE 754-2019 compliance
--- 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 5271c7a commit f9e7a27

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,21 @@ tape( 'if provided an integer, the function returns `+-0`', function test( t ) {
7272
t.end();
7373
});
7474

75+
tape( 'the function is odd', function test( t ) {
76+
var expected;
77+
var x;
78+
var y;
79+
var i;
80+
81+
x = decimals.x;
82+
for ( i = 0; i < x.length; i++ ) {
83+
y = sinpi( -x[i] );
84+
expected = -sinpi( x[i] );
85+
t.equal( y, expected, 'returns '+expected );
86+
}
87+
t.end();
88+
});
89+
7590
tape( 'the function computes `sin(πx)`', function test( t ) {
7691
var expected;
7792
var delta;

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,21 @@ tape( 'if provided an integer, the function returns `+-0`', opts, function test(
8181
t.end();
8282
});
8383

84+
tape( 'the function is odd', opts, function test( t ) {
85+
var expected;
86+
var x;
87+
var y;
88+
var i;
89+
90+
x = decimals.x;
91+
for ( i = 0; i < x.length; i++ ) {
92+
y = sinpi( -x[i] );
93+
expected = -sinpi( x[i] );
94+
t.equal( y, expected, 'returns '+expected );
95+
}
96+
t.end();
97+
});
98+
8499
tape( 'the function computes `sin(πx)`', opts, function test( t ) {
85100
var expected;
86101
var delta;

0 commit comments

Comments
 (0)