@stdlib/math-base-special-exp 0.2.4 → 0.2.5
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 +13 -13
- package/manifest.json +24 -1
- package/package.json +8 -8
- package/src/addon.c +0 -1
- package/src/main.c +1 -1
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2026 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -101,16 +101,16 @@ v = exp( NaN );
|
|
|
101
101
|
<!-- eslint no-undef: "error" -->
|
|
102
102
|
|
|
103
103
|
```javascript
|
|
104
|
-
var
|
|
104
|
+
var uniform = require( '@stdlib/random-array-uniform' );
|
|
105
|
+
var logEachMap = require( '@stdlib/console-log-each-map' );
|
|
105
106
|
var exp = require( '@stdlib/math-base-special-exp' );
|
|
106
107
|
|
|
107
|
-
var
|
|
108
|
-
|
|
108
|
+
var opts = {
|
|
109
|
+
'dtype': 'float64'
|
|
110
|
+
};
|
|
111
|
+
var x = uniform( 100, -50.0, 50.0, opts );
|
|
109
112
|
|
|
110
|
-
|
|
111
|
-
x = (randu()*100.0) - 50.0;
|
|
112
|
-
console.log( 'e^%d = %d', x, exp( x ) );
|
|
113
|
-
}
|
|
113
|
+
logEachMap( 'e^%0.4f = %0.4f', x, exp );
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
</section>
|
|
@@ -190,7 +190,7 @@ int main( void ) {
|
|
|
190
190
|
double x;
|
|
191
191
|
double v;
|
|
192
192
|
int i;
|
|
193
|
-
|
|
193
|
+
|
|
194
194
|
for ( i = 0; i < 100; i++ ) {
|
|
195
195
|
x = ( (double)rand() / (double)RAND_MAX ) * 100.0;
|
|
196
196
|
v = stdlib_base_exp( x );
|
|
@@ -245,7 +245,7 @@ For more information on the project, filing bug reports and feature requests, an
|
|
|
245
245
|
|
|
246
246
|
## Copyright
|
|
247
247
|
|
|
248
|
-
Copyright © 2016-
|
|
248
|
+
Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
|
|
249
249
|
|
|
250
250
|
</section>
|
|
251
251
|
|
|
@@ -258,8 +258,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
258
258
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/math-base-special-exp.svg
|
|
259
259
|
[npm-url]: https://npmjs.org/package/@stdlib/math-base-special-exp
|
|
260
260
|
|
|
261
|
-
[test-image]: https://github.com/stdlib-js/math-base-special-exp/actions/workflows/test.yml/badge.svg?branch=v0.2.
|
|
262
|
-
[test-url]: https://github.com/stdlib-js/math-base-special-exp/actions/workflows/test.yml?query=branch:v0.2.
|
|
261
|
+
[test-image]: https://github.com/stdlib-js/math-base-special-exp/actions/workflows/test.yml/badge.svg?branch=v0.2.5
|
|
262
|
+
[test-url]: https://github.com/stdlib-js/math-base-special-exp/actions/workflows/test.yml?query=branch:v0.2.5
|
|
263
263
|
|
|
264
264
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-exp/main.svg
|
|
265
265
|
[coverage-url]: https://codecov.io/github/stdlib-js/math-base-special-exp?branch=main
|
|
@@ -271,8 +271,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
271
271
|
|
|
272
272
|
-->
|
|
273
273
|
|
|
274
|
-
[chat-image]: https://img.shields.io/
|
|
275
|
-
[chat-url]: https://
|
|
274
|
+
[chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
|
|
275
|
+
[chat-url]: https://stdlib.zulipchat.com
|
|
276
276
|
|
|
277
277
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
278
278
|
|
package/manifest.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"options": {
|
|
3
|
-
"task": "build"
|
|
3
|
+
"task": "build",
|
|
4
|
+
"wasm": false
|
|
4
5
|
},
|
|
5
6
|
"fields": [
|
|
6
7
|
{
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
"confs": [
|
|
28
29
|
{
|
|
29
30
|
"task": "build",
|
|
31
|
+
"wasm": false,
|
|
30
32
|
"src": [
|
|
31
33
|
"./src/main.c"
|
|
32
34
|
],
|
|
@@ -46,6 +48,7 @@
|
|
|
46
48
|
},
|
|
47
49
|
{
|
|
48
50
|
"task": "benchmark",
|
|
51
|
+
"wasm": false,
|
|
49
52
|
"src": [
|
|
50
53
|
"./src/main.c"
|
|
51
54
|
],
|
|
@@ -64,6 +67,26 @@
|
|
|
64
67
|
},
|
|
65
68
|
{
|
|
66
69
|
"task": "examples",
|
|
70
|
+
"wasm": false,
|
|
71
|
+
"src": [
|
|
72
|
+
"./src/main.c"
|
|
73
|
+
],
|
|
74
|
+
"include": [
|
|
75
|
+
"./include"
|
|
76
|
+
],
|
|
77
|
+
"libraries": [],
|
|
78
|
+
"libpath": [],
|
|
79
|
+
"dependencies": [
|
|
80
|
+
"@stdlib/math-base-assert-is-nan",
|
|
81
|
+
"@stdlib/constants-float64-ninf",
|
|
82
|
+
"@stdlib/constants-float64-pinf",
|
|
83
|
+
"@stdlib/math-base-special-trunc",
|
|
84
|
+
"@stdlib/math-base-special-ldexp"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"task": "build",
|
|
89
|
+
"wasm": true,
|
|
67
90
|
"src": [
|
|
68
91
|
"./src/main.c"
|
|
69
92
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/math-base-special-exp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Natural exponential function.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@stdlib/constants-float64-ninf": "^0.2.
|
|
38
|
-
"@stdlib/constants-float64-pinf": "^0.2.
|
|
39
|
-
"@stdlib/math-base-assert-is-nan": "^0.2.
|
|
40
|
-
"@stdlib/math-base-napi-unary": "^0.2.
|
|
41
|
-
"@stdlib/math-base-special-ldexp": "^0.2.
|
|
42
|
-
"@stdlib/math-base-special-trunc": "^0.2.
|
|
43
|
-
"@stdlib/utils-library-manifest": "^0.2.
|
|
37
|
+
"@stdlib/constants-float64-ninf": "^0.2.3",
|
|
38
|
+
"@stdlib/constants-float64-pinf": "^0.2.3",
|
|
39
|
+
"@stdlib/math-base-assert-is-nan": "^0.2.3",
|
|
40
|
+
"@stdlib/math-base-napi-unary": "^0.2.7",
|
|
41
|
+
"@stdlib/math-base-special-ldexp": "^0.2.4",
|
|
42
|
+
"@stdlib/math-base-special-trunc": "^0.2.3",
|
|
43
|
+
"@stdlib/utils-library-manifest": "^0.2.4"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {},
|
|
46
46
|
"engines": {
|
package/src/addon.c
CHANGED
package/src/main.c
CHANGED
|
@@ -214,7 +214,7 @@ static double expmulti( const double hi, const double lo, const int32_t k ) {
|
|
|
214
214
|
* - 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.
|
|
215
215
|
*
|
|
216
216
|
* @param x input value
|
|
217
|
-
* @return
|
|
217
|
+
* @return output value
|
|
218
218
|
*
|
|
219
219
|
* @example
|
|
220
220
|
* double out = stdlib_base_exp( 0.0 );
|