@stdlib/math-base-special-abs2 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +1 -1
- package/README.md +11 -13
- package/include/stdlib/math/base/special/abs2.h +0 -3
- package/manifest.json +82 -65
- package/package.json +3 -4
- package/include.gypi +0 -53
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2026 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -91,17 +91,15 @@ v = abs2( NaN );
|
|
|
91
91
|
<!-- eslint no-undef: "error" -->
|
|
92
92
|
|
|
93
93
|
```javascript
|
|
94
|
-
var
|
|
95
|
-
var
|
|
94
|
+
var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );
|
|
95
|
+
var logEachMap = require( '@stdlib/console-log-each-map' );
|
|
96
96
|
var abs2 = require( '@stdlib/math-base-special-abs2' );
|
|
97
97
|
|
|
98
|
-
var x
|
|
99
|
-
|
|
98
|
+
var x = discreteUniform( 100, -50, 50, {
|
|
99
|
+
'dtype': 'float64'
|
|
100
|
+
});
|
|
100
101
|
|
|
101
|
-
|
|
102
|
-
x = round( randu() * 100.0 ) - 50.0;
|
|
103
|
-
console.log( 'abs2(%d) = %d', x, abs2( x ) );
|
|
104
|
-
}
|
|
102
|
+
logEachMap( 'abs2(%d) = %d', x, abs2 );
|
|
105
103
|
```
|
|
106
104
|
|
|
107
105
|
</section>
|
|
@@ -234,7 +232,7 @@ See [LICENSE][stdlib-license].
|
|
|
234
232
|
|
|
235
233
|
## Copyright
|
|
236
234
|
|
|
237
|
-
Copyright © 2016-
|
|
235
|
+
Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
|
|
238
236
|
|
|
239
237
|
</section>
|
|
240
238
|
|
|
@@ -247,8 +245,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
247
245
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/math-base-special-abs2.svg
|
|
248
246
|
[npm-url]: https://npmjs.org/package/@stdlib/math-base-special-abs2
|
|
249
247
|
|
|
250
|
-
[test-image]: https://github.com/stdlib-js/math-base-special-abs2/actions/workflows/test.yml/badge.svg?branch=v0.2.
|
|
251
|
-
[test-url]: https://github.com/stdlib-js/math-base-special-abs2/actions/workflows/test.yml?query=branch:v0.2.
|
|
248
|
+
[test-image]: https://github.com/stdlib-js/math-base-special-abs2/actions/workflows/test.yml/badge.svg?branch=v0.2.3
|
|
249
|
+
[test-url]: https://github.com/stdlib-js/math-base-special-abs2/actions/workflows/test.yml?query=branch:v0.2.3
|
|
252
250
|
|
|
253
251
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-abs2/main.svg
|
|
254
252
|
[coverage-url]: https://codecov.io/github/stdlib-js/math-base-special-abs2?branch=main
|
|
@@ -260,8 +258,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
260
258
|
|
|
261
259
|
-->
|
|
262
260
|
|
|
263
|
-
[chat-image]: https://img.shields.io/
|
|
264
|
-
[chat-url]: https://
|
|
261
|
+
[chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
|
|
262
|
+
[chat-url]: https://stdlib.zulipchat.com
|
|
265
263
|
|
|
266
264
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
267
265
|
|
package/manifest.json
CHANGED
|
@@ -1,67 +1,84 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
2
|
+
"options": {
|
|
3
|
+
"task": "build",
|
|
4
|
+
"wasm": false
|
|
5
|
+
},
|
|
6
|
+
"fields": [
|
|
7
|
+
{
|
|
8
|
+
"field": "src",
|
|
9
|
+
"resolve": true,
|
|
10
|
+
"relative": true
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"field": "include",
|
|
14
|
+
"resolve": true,
|
|
15
|
+
"relative": true
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"field": "libraries",
|
|
19
|
+
"resolve": false,
|
|
20
|
+
"relative": false
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"field": "libpath",
|
|
24
|
+
"resolve": true,
|
|
25
|
+
"relative": false
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"confs": [
|
|
29
|
+
{
|
|
30
|
+
"task": "build",
|
|
31
|
+
"wasm": false,
|
|
32
|
+
"src": [
|
|
33
|
+
"./src/main.c"
|
|
34
|
+
],
|
|
35
|
+
"include": [
|
|
36
|
+
"./include"
|
|
37
|
+
],
|
|
38
|
+
"libraries": [],
|
|
39
|
+
"libpath": [],
|
|
40
|
+
"dependencies": [
|
|
41
|
+
"@stdlib/math-base-napi-unary"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"task": "benchmark",
|
|
46
|
+
"wasm": false,
|
|
47
|
+
"src": [
|
|
48
|
+
"./src/main.c"
|
|
49
|
+
],
|
|
50
|
+
"include": [
|
|
51
|
+
"./include"
|
|
52
|
+
],
|
|
53
|
+
"libraries": [],
|
|
54
|
+
"libpath": [],
|
|
55
|
+
"dependencies": []
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"task": "examples",
|
|
59
|
+
"wasm": false,
|
|
60
|
+
"src": [
|
|
61
|
+
"./src/main.c"
|
|
62
|
+
],
|
|
63
|
+
"include": [
|
|
64
|
+
"./include"
|
|
65
|
+
],
|
|
66
|
+
"libraries": [],
|
|
67
|
+
"libpath": [],
|
|
68
|
+
"dependencies": []
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"task": "build",
|
|
72
|
+
"wasm": true,
|
|
73
|
+
"src": [
|
|
74
|
+
"./src/main.c"
|
|
75
|
+
],
|
|
76
|
+
"include": [
|
|
77
|
+
"./include"
|
|
78
|
+
],
|
|
79
|
+
"libraries": [],
|
|
80
|
+
"libpath": [],
|
|
81
|
+
"dependencies": []
|
|
82
|
+
}
|
|
83
|
+
]
|
|
67
84
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/math-base-special-abs2",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Compute the squared absolute value of a double-precision floating-point number.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@stdlib/math-base-napi-unary": "^0.2.
|
|
37
|
-
"@stdlib/utils-library-manifest": "^0.2.
|
|
36
|
+
"@stdlib/math-base-napi-unary": "^0.2.6",
|
|
37
|
+
"@stdlib/utils-library-manifest": "^0.2.3"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {},
|
|
40
40
|
"engines": {
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
"double",
|
|
70
70
|
"dbl"
|
|
71
71
|
],
|
|
72
|
-
"__stdlib__": {},
|
|
73
72
|
"funding": {
|
|
74
73
|
"type": "opencollective",
|
|
75
74
|
"url": "https://opencollective.com/stdlib"
|
package/include.gypi
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# @license Apache-2.0
|
|
2
|
-
#
|
|
3
|
-
# Copyright (c) 2018 The Stdlib Authors.
|
|
4
|
-
#
|
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
# you may not use this file except in compliance with the License.
|
|
7
|
-
# You may obtain a copy of the License at
|
|
8
|
-
#
|
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
#
|
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
# See the License for the specific language governing permissions and
|
|
15
|
-
# limitations under the License.
|
|
16
|
-
|
|
17
|
-
# A GYP include file for building a Node.js native add-on.
|
|
18
|
-
#
|
|
19
|
-
# Main documentation:
|
|
20
|
-
#
|
|
21
|
-
# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
|
|
22
|
-
# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
|
|
23
|
-
{
|
|
24
|
-
# Define variables to be used throughout the configuration for all targets:
|
|
25
|
-
'variables': {
|
|
26
|
-
# Source directory:
|
|
27
|
-
'src_dir': './src',
|
|
28
|
-
|
|
29
|
-
# Include directories:
|
|
30
|
-
'include_dirs': [
|
|
31
|
-
'<!@(node -e "var arr = require(\'@stdlib/utils-library-manifest\')(\'./manifest.json\',{},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).include; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
|
|
32
|
-
],
|
|
33
|
-
|
|
34
|
-
# Add-on destination directory:
|
|
35
|
-
'addon_output_dir': './src',
|
|
36
|
-
|
|
37
|
-
# Source files:
|
|
38
|
-
'src_files': [
|
|
39
|
-
'<(src_dir)/addon.c',
|
|
40
|
-
'<!@(node -e "var arr = require(\'@stdlib/utils-library-manifest\')(\'./manifest.json\',{},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).src; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
|
|
41
|
-
],
|
|
42
|
-
|
|
43
|
-
# Library dependencies:
|
|
44
|
-
'libraries': [
|
|
45
|
-
'<!@(node -e "var arr = require(\'@stdlib/utils-library-manifest\')(\'./manifest.json\',{},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).libraries; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
|
|
46
|
-
],
|
|
47
|
-
|
|
48
|
-
# Library directories:
|
|
49
|
-
'library_dirs': [
|
|
50
|
-
'<!@(node -e "var arr = require(\'@stdlib/utils-library-manifest\')(\'./manifest.json\',{},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).libpath; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
|
|
51
|
-
],
|
|
52
|
-
}, # end variables
|
|
53
|
-
}
|