@stdlib/math-base-special-exp 0.0.6 → 0.2.0
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/LICENSE +3 -262
- package/NOTICE +1 -1
- package/README.md +122 -24
- package/SECURITY.md +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +7 -0
- package/docs/types/index.d.ts +1 -1
- package/include/stdlib/math/base/special/exp.h +38 -0
- package/include.gypi +53 -0
- package/lib/expmulti.js +31 -1
- package/lib/index.js +2 -2
- package/lib/{exp.js → main.js} +33 -5
- package/lib/native.js +58 -0
- package/lib/polyval_p.js +1 -2
- package/manifest.json +84 -0
- package/package.json +27 -15
- package/src/addon.c +24 -0
- package/src/main.c +253 -0
- package/docs/repl.txt +0 -28
- package/docs/types/test.ts +0 -44
package/include.gypi
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# @license Apache-2.0
|
|
2
|
+
#
|
|
3
|
+
# Copyright (c) 2022 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
|
+
}
|
package/lib/expmulti.js
CHANGED
|
@@ -18,7 +18,37 @@
|
|
|
18
18
|
*
|
|
19
19
|
* ## Notice
|
|
20
20
|
*
|
|
21
|
-
* The following
|
|
21
|
+
* The following copyrights, licenses, and long comment were part of the original implementation available as part of [Go]{@link https://github.com/golang/go/blob/cb07765045aed5104a3df31507564ac99e6ddce8/src/math/exp.go}, which in turn was based on an implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/9.3.0/lib/msun/src/e_exp.c}. The implementation follows the original, but has been modified for JavaScript.
|
|
22
|
+
*
|
|
23
|
+
* ```text
|
|
24
|
+
* Copyright (c) 2009 The Go Authors. All rights reserved.
|
|
25
|
+
*
|
|
26
|
+
* Redistribution and use in source and binary forms, with or without
|
|
27
|
+
* modification, are permitted provided that the following conditions are
|
|
28
|
+
* met:
|
|
29
|
+
*
|
|
30
|
+
* * Redistributions of source code must retain the above copyright
|
|
31
|
+
* notice, this list of conditions and the following disclaimer.
|
|
32
|
+
* * Redistributions in binary form must reproduce the above
|
|
33
|
+
* copyright notice, this list of conditions and the following disclaimer
|
|
34
|
+
* in the documentation and/or other materials provided with the
|
|
35
|
+
* distribution.
|
|
36
|
+
* * Neither the name of Google Inc. nor the names of its
|
|
37
|
+
* contributors may be used to endorse or promote products derived from
|
|
38
|
+
* this software without specific prior written permission.
|
|
39
|
+
*
|
|
40
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
41
|
+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
42
|
+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
43
|
+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
44
|
+
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
45
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
46
|
+
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
47
|
+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
48
|
+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
49
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
50
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
51
|
+
* ```
|
|
22
52
|
*
|
|
23
53
|
* ```text
|
|
24
54
|
* Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
|
package/lib/index.js
CHANGED
package/lib/{exp.js → main.js}
RENAMED
|
@@ -18,7 +18,37 @@
|
|
|
18
18
|
*
|
|
19
19
|
* ## Notice
|
|
20
20
|
*
|
|
21
|
-
* The following
|
|
21
|
+
* The following copyrights, licenses, and long comment were part of the original implementation available as part of [Go]{@link https://github.com/golang/go/blob/cb07765045aed5104a3df31507564ac99e6ddce8/src/math/exp.go}, which in turn was based on an implementation available as part of [FreeBSD]{@link https://svnweb.freebsd.org/base/release/9.3.0/lib/msun/src/e_exp.c}. The implementation follows the original, but has been modified for JavaScript.
|
|
22
|
+
*
|
|
23
|
+
* ```text
|
|
24
|
+
* Copyright (c) 2009 The Go Authors. All rights reserved.
|
|
25
|
+
*
|
|
26
|
+
* Redistribution and use in source and binary forms, with or without
|
|
27
|
+
* modification, are permitted provided that the following conditions are
|
|
28
|
+
* met:
|
|
29
|
+
*
|
|
30
|
+
* * Redistributions of source code must retain the above copyright
|
|
31
|
+
* notice, this list of conditions and the following disclaimer.
|
|
32
|
+
* * Redistributions in binary form must reproduce the above
|
|
33
|
+
* copyright notice, this list of conditions and the following disclaimer
|
|
34
|
+
* in the documentation and/or other materials provided with the
|
|
35
|
+
* distribution.
|
|
36
|
+
* * Neither the name of Google Inc. nor the names of its
|
|
37
|
+
* contributors may be used to endorse or promote products derived from
|
|
38
|
+
* this software without specific prior written permission.
|
|
39
|
+
*
|
|
40
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
41
|
+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
42
|
+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
43
|
+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
44
|
+
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
45
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
46
|
+
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
47
|
+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
48
|
+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
49
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
50
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
51
|
+
* ```
|
|
22
52
|
*
|
|
23
53
|
* ```text
|
|
24
54
|
* Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
|
|
@@ -48,7 +78,7 @@ var LN2_LO = 1.90821492927058770002e-10;
|
|
|
48
78
|
var LOG2_E = 1.44269504088896338700e+00;
|
|
49
79
|
var OVERFLOW = 7.09782712893383973096e+02;
|
|
50
80
|
var UNDERFLOW = -7.45133219101941108420e+02;
|
|
51
|
-
var NEARZERO = 1.0 / (1 << 28); // 2^-28
|
|
81
|
+
var NEARZERO = 1.0 / (1 << 28); // 2^-28
|
|
52
82
|
var NEG_NEARZERO = -NEARZERO;
|
|
53
83
|
|
|
54
84
|
|
|
@@ -122,7 +152,6 @@ var NEG_NEARZERO = -NEARZERO;
|
|
|
122
152
|
* e^{x} = 2^k e^{r}
|
|
123
153
|
* ```
|
|
124
154
|
*
|
|
125
|
-
*
|
|
126
155
|
* ## Special Cases
|
|
127
156
|
*
|
|
128
157
|
* ```tex
|
|
@@ -145,7 +174,6 @@ var NEG_NEARZERO = -NEARZERO;
|
|
|
145
174
|
*
|
|
146
175
|
* - The hexadecimal values included in the source code are the intended ones for the used constants. Decimal values may be used, provided that the compiler will convert from decimal to binary accurately enough to produce the intended hexadecimal values.
|
|
147
176
|
*
|
|
148
|
-
*
|
|
149
177
|
* @param {number} x - input value
|
|
150
178
|
* @returns {number} function value
|
|
151
179
|
*
|
|
@@ -188,7 +216,7 @@ function exp( x ) {
|
|
|
188
216
|
) {
|
|
189
217
|
return 1.0 + x;
|
|
190
218
|
}
|
|
191
|
-
// Reduce and compute `r = hi - lo` for extra precision
|
|
219
|
+
// Reduce and compute `r = hi - lo` for extra precision...
|
|
192
220
|
if ( x < 0.0 ) {
|
|
193
221
|
k = trunc( (LOG2_E*x) - 0.5 );
|
|
194
222
|
} else {
|
package/lib/native.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Apache-2.0
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2022 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 addon = require( './../src/addon.node' );
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
// MAIN //
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Evaluates the natural exponential function.
|
|
30
|
+
*
|
|
31
|
+
* @private
|
|
32
|
+
* @param {number} x - input value
|
|
33
|
+
* @returns {number} function value
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* var v = exp( 4.0 );
|
|
37
|
+
* // returns ~54.5982
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* var v = exp( -9.0 );
|
|
41
|
+
* // returns ~1.234e-4
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* var v = exp( 0.0 );
|
|
45
|
+
* // returns 1.0
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* var v = exp( NaN );
|
|
49
|
+
* // returns NaN
|
|
50
|
+
*/
|
|
51
|
+
function exp( x ) {
|
|
52
|
+
return addon( x );
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
// EXPORTS //
|
|
57
|
+
|
|
58
|
+
module.exports = exp;
|
package/lib/polyval_p.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license Apache-2.0
|
|
3
3
|
*
|
|
4
|
-
* Copyright (c)
|
|
4
|
+
* Copyright (c) 2022 The Stdlib Authors.
|
|
5
5
|
*
|
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
* you may not use this file except in compliance with the License.
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
*
|
|
31
31
|
* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
33
|
* @private
|
|
35
34
|
* @param {number} x - value at which to evaluate the polynomial
|
|
36
35
|
* @returns {number} evaluated polynomial
|
package/manifest.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"options": {
|
|
3
|
+
"task": "build"
|
|
4
|
+
},
|
|
5
|
+
"fields": [
|
|
6
|
+
{
|
|
7
|
+
"field": "src",
|
|
8
|
+
"resolve": true,
|
|
9
|
+
"relative": true
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"field": "include",
|
|
13
|
+
"resolve": true,
|
|
14
|
+
"relative": true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"field": "libraries",
|
|
18
|
+
"resolve": false,
|
|
19
|
+
"relative": false
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"field": "libpath",
|
|
23
|
+
"resolve": true,
|
|
24
|
+
"relative": false
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"confs": [
|
|
28
|
+
{
|
|
29
|
+
"task": "build",
|
|
30
|
+
"src": [
|
|
31
|
+
"./src/main.c"
|
|
32
|
+
],
|
|
33
|
+
"include": [
|
|
34
|
+
"./include"
|
|
35
|
+
],
|
|
36
|
+
"libraries": [],
|
|
37
|
+
"libpath": [],
|
|
38
|
+
"dependencies": [
|
|
39
|
+
"@stdlib/math-base-napi-unary",
|
|
40
|
+
"@stdlib/math-base-assert-is-nan",
|
|
41
|
+
"@stdlib/constants-float64-ninf",
|
|
42
|
+
"@stdlib/constants-float64-pinf",
|
|
43
|
+
"@stdlib/math-base-special-trunc",
|
|
44
|
+
"@stdlib/math-base-special-ldexp"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"task": "benchmark",
|
|
49
|
+
"src": [
|
|
50
|
+
"./src/main.c"
|
|
51
|
+
],
|
|
52
|
+
"include": [
|
|
53
|
+
"./include"
|
|
54
|
+
],
|
|
55
|
+
"libraries": [],
|
|
56
|
+
"libpath": [],
|
|
57
|
+
"dependencies": [
|
|
58
|
+
"@stdlib/math-base-assert-is-nan",
|
|
59
|
+
"@stdlib/constants-float64-ninf",
|
|
60
|
+
"@stdlib/constants-float64-pinf",
|
|
61
|
+
"@stdlib/math-base-special-trunc",
|
|
62
|
+
"@stdlib/math-base-special-ldexp"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"task": "examples",
|
|
67
|
+
"src": [
|
|
68
|
+
"./src/main.c"
|
|
69
|
+
],
|
|
70
|
+
"include": [
|
|
71
|
+
"./include"
|
|
72
|
+
],
|
|
73
|
+
"libraries": [],
|
|
74
|
+
"libpath": [],
|
|
75
|
+
"dependencies": [
|
|
76
|
+
"@stdlib/math-base-assert-is-nan",
|
|
77
|
+
"@stdlib/constants-float64-ninf",
|
|
78
|
+
"@stdlib/constants-float64-pinf",
|
|
79
|
+
"@stdlib/math-base-special-trunc",
|
|
80
|
+
"@stdlib/math-base-special-ldexp"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/math-base-special-exp",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Natural exponential function.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -18,8 +18,10 @@
|
|
|
18
18
|
"benchmark": "./benchmark",
|
|
19
19
|
"doc": "./docs",
|
|
20
20
|
"example": "./examples",
|
|
21
|
+
"include": "./include",
|
|
21
22
|
"lib": "./lib",
|
|
22
23
|
"scripts": "./scripts",
|
|
24
|
+
"src": "./src",
|
|
23
25
|
"test": "./test"
|
|
24
26
|
},
|
|
25
27
|
"types": "./docs/types",
|
|
@@ -38,22 +40,32 @@
|
|
|
38
40
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
39
41
|
},
|
|
40
42
|
"dependencies": {
|
|
41
|
-
"@stdlib/constants-float64-ninf": "^0.0
|
|
42
|
-
"@stdlib/constants-float64-pinf": "^0.0
|
|
43
|
-
"@stdlib/math-base-assert-is-nan": "^0.0
|
|
44
|
-
"@stdlib/math-base-
|
|
45
|
-
"@stdlib/math-base-special-
|
|
43
|
+
"@stdlib/constants-float64-ninf": "^0.2.0",
|
|
44
|
+
"@stdlib/constants-float64-pinf": "^0.2.0",
|
|
45
|
+
"@stdlib/math-base-assert-is-nan": "^0.2.0",
|
|
46
|
+
"@stdlib/math-base-napi-unary": "^0.2.0",
|
|
47
|
+
"@stdlib/math-base-special-ldexp": "^0.2.0",
|
|
48
|
+
"@stdlib/math-base-special-trunc": "^0.2.0",
|
|
49
|
+
"@stdlib/utils-library-manifest": "^0.2.0"
|
|
46
50
|
},
|
|
47
51
|
"devDependencies": {
|
|
48
|
-
"@stdlib/
|
|
49
|
-
"@stdlib/
|
|
50
|
-
"@stdlib/fs-write-file": "^0.
|
|
51
|
-
"@stdlib/math-base-special-abs": "^0.
|
|
52
|
-
"@stdlib/math-base-tools-evalpoly-compile": "^0.0
|
|
53
|
-
"@stdlib/
|
|
52
|
+
"@stdlib/constants-float64-eps": "^0.1.1",
|
|
53
|
+
"@stdlib/fs-read-file": "^0.1.1",
|
|
54
|
+
"@stdlib/fs-write-file": "^0.1.1",
|
|
55
|
+
"@stdlib/math-base-special-abs": "^0.1.1",
|
|
56
|
+
"@stdlib/math-base-tools-evalpoly-compile": "^0.1.0",
|
|
57
|
+
"@stdlib/math-base-tools-evalpoly-compile-c": "^0.1.0",
|
|
58
|
+
"@stdlib/random-base-randu": "^0.1.0",
|
|
59
|
+
"@stdlib/string-format": "^0.2.0",
|
|
60
|
+
"@stdlib/string-substring-after": "^0.1.0",
|
|
61
|
+
"@stdlib/string-substring-before": "^0.2.0",
|
|
62
|
+
"@stdlib/time-current-year": "^0.1.1",
|
|
63
|
+
"@stdlib/utils-try-require": "^0.2.0",
|
|
54
64
|
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
|
|
55
65
|
"istanbul": "^0.4.1",
|
|
56
|
-
"tap-
|
|
66
|
+
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",
|
|
67
|
+
"@stdlib/bench-harness": "^0.2.0",
|
|
68
|
+
"@stdlib/bench": "^0.3.1"
|
|
57
69
|
},
|
|
58
70
|
"engines": {
|
|
59
71
|
"node": ">=0.10.0",
|
|
@@ -86,7 +98,7 @@
|
|
|
86
98
|
"number"
|
|
87
99
|
],
|
|
88
100
|
"funding": {
|
|
89
|
-
"type": "
|
|
90
|
-
"url": "https://
|
|
101
|
+
"type": "opencollective",
|
|
102
|
+
"url": "https://opencollective.com/stdlib"
|
|
91
103
|
}
|
|
92
104
|
}
|
package/src/addon.c
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @license Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2022 The Stdlib Authors.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
#include "stdlib/math/base/special/exp.h"
|
|
21
|
+
#include "stdlib/math/base/napi/unary.h"
|
|
22
|
+
|
|
23
|
+
// cppcheck-suppress shadowFunction
|
|
24
|
+
STDLIB_MATH_BASE_NAPI_MODULE_D_D( stdlib_base_exp )
|