Skip to content

Commit 9f1195a

Browse files
committed
test: add tests to achieve full coverage in math/base/special/sici
--- 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 e41e763 commit 9f1195a

File tree

12 files changed

+540
-0
lines changed

12 files changed

+540
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var evalpoly = require( './../lib/polyval_cd.js' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof evalpoly, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function evaluates a polynomial for x = 0', function test( t ) {
36+
var v = evalpoly( 0.0 );
37+
t.strictEqual( v, 4.0, 'returns expected value' );
38+
t.end();
39+
});
40+
41+
tape( 'the function evaluates a polynomial for x = -0', function test( t ) {
42+
var v = evalpoly( -0.0 );
43+
t.strictEqual( v, 4.0, 'returns expected value' );
44+
t.end();
45+
});
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var evalpoly = require( './../lib/polyval_cn.js' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof evalpoly, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function evaluates a polynomial for x = 0', function test( t ) {
36+
var v = evalpoly( 0.0 );
37+
t.strictEqual( v, -1.0, 'returns expected value' );
38+
t.end();
39+
});
40+
41+
tape( 'the function evaluates a polynomial for x = -0', function test( t ) {
42+
var v = evalpoly( -0.0 );
43+
t.strictEqual( v, -1.0, 'returns expected value' );
44+
t.end();
45+
});
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var evalpoly = require( './../lib/polyval_fd4.js' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof evalpoly, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function evaluates a polynomial for x = 0', function test( t ) {
36+
var v = evalpoly( 0.0 );
37+
t.strictEqual( v, 5.489002527562557e-7, 'returns expected value' );
38+
t.end();
39+
});
40+
41+
tape( 'the function evaluates a polynomial for x = -0', function test( t ) {
42+
var v = evalpoly( -0.0 );
43+
t.strictEqual( v, 5.489002527562557e-7, 'returns expected value' );
44+
t.end();
45+
});
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var evalpoly = require( './../lib/polyval_fd8.js' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof evalpoly, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function evaluates a polynomial for x = 0', function test( t ) {
36+
var v = evalpoly( 0.0 );
37+
t.strictEqual( v, 9.70507110881952e-14, 'returns expected value' );
38+
t.end();
39+
});
40+
41+
tape( 'the function evaluates a polynomial for x = -0', function test( t ) {
42+
var v = evalpoly( -0.0 );
43+
t.strictEqual( v, 9.70507110881952e-14, 'returns expected value' );
44+
t.end();
45+
});
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var evalpoly = require( './../lib/polyval_fn4.js' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof evalpoly, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function evaluates a polynomial for x = 0', function test( t ) {
36+
var v = evalpoly( 0.0 );
37+
t.strictEqual( v, 5.489002234213736e-7, 'returns expected value' );
38+
t.end();
39+
});
40+
41+
tape( 'the function evaluates a polynomial for x = -0', function test( t ) {
42+
var v = evalpoly( -0.0 );
43+
t.strictEqual( v, 5.489002234213736e-7, 'returns expected value' );
44+
t.end();
45+
});
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var evalpoly = require( './../lib/polyval_fn8.js' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof evalpoly, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function evaluates a polynomial for x = 0', function test( t ) {
36+
var v = evalpoly( 0.0 );
37+
t.strictEqual( v, 9.70507110881952e-14, 'returns expected value' );
38+
t.end();
39+
});
40+
41+
tape( 'the function evaluates a polynomial for x = -0', function test( t ) {
42+
var v = evalpoly( -0.0 );
43+
t.strictEqual( v, 9.70507110881952e-14, 'returns expected value' );
44+
t.end();
45+
});
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var evalpoly = require( './../lib/polyval_gd4.js' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof evalpoly, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function evaluates a polynomial for x = 0', function test( t ) {
36+
var v = evalpoly( 0.0 );
37+
t.strictEqual( v, 7.825792189335346e-9, 'returns expected value' );
38+
t.end();
39+
});
40+
41+
tape( 'the function evaluates a polynomial for x = -0', function test( t ) {
42+
var v = evalpoly( -0.0 );
43+
t.strictEqual( v, 7.825792189335346e-9, 'returns expected value' );
44+
t.end();
45+
});
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var tape = require( 'tape' );
24+
var evalpoly = require( './../lib/polyval_gd8.js' );
25+
26+
27+
// TESTS //
28+
29+
tape( 'main export is a function', function test( t ) {
30+
t.ok( true, __filename );
31+
t.strictEqual( typeof evalpoly, 'function', 'main export is a function' );
32+
t.end();
33+
});
34+
35+
tape( 'the function evaluates a polynomial for x = 0', function test( t ) {
36+
var v = evalpoly( 0.0 );
37+
t.strictEqual( v, 3.1404009894636335e-15, 'returns expected value' );
38+
t.end();
39+
});
40+
41+
tape( 'the function evaluates a polynomial for x = -0', function test( t ) {
42+
var v = evalpoly( -0.0 );
43+
t.strictEqual( v, 3.1404009894636335e-15, 'returns expected value' );
44+
t.end();
45+
});

0 commit comments

Comments
 (0)