@stdlib/math-base-special-round10 0.3.0 → 0.3.1
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 -15
- package/package.json +9 -9
- package/src/addon.c +0 -1
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2026 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -106,18 +106,16 @@ v = round10( NaN );
|
|
|
106
106
|
<!-- eslint no-undef: "error" -->
|
|
107
107
|
|
|
108
108
|
```javascript
|
|
109
|
-
var
|
|
109
|
+
var uniform = require( '@stdlib/random-array-uniform' );
|
|
110
|
+
var logEachMap = require( '@stdlib/console-log-each-map' );
|
|
110
111
|
var round10 = require( '@stdlib/math-base-special-round10' );
|
|
111
112
|
|
|
112
|
-
var
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
var opts = {
|
|
114
|
+
'dtype': 'float64'
|
|
115
|
+
};
|
|
116
|
+
var x = uniform( 100, -50.0, 50.0, opts );
|
|
115
117
|
|
|
116
|
-
|
|
117
|
-
x = (randu()*100.0) - 50.0;
|
|
118
|
-
v = round10( x );
|
|
119
|
-
console.log( 'Value: %d. Rounded: %d.', x, v );
|
|
120
|
-
}
|
|
118
|
+
logEachMap( 'x: %0.4f. Rounded: %0.4f.', x, round10 );
|
|
121
119
|
```
|
|
122
120
|
|
|
123
121
|
</section>
|
|
@@ -191,7 +189,7 @@ double stdlib_base_round10( const double x );
|
|
|
191
189
|
|
|
192
190
|
int main( void ) {
|
|
193
191
|
const double x[] = { -5.0, -3.89, -2.78, -1.67, -0.56, 0.56, 1.67, 2.78, 3.89, 5.0 };
|
|
194
|
-
|
|
192
|
+
|
|
195
193
|
double v;
|
|
196
194
|
int i;
|
|
197
195
|
for ( i = 0; i < 10; i++ ) {
|
|
@@ -252,7 +250,7 @@ See [LICENSE][stdlib-license].
|
|
|
252
250
|
|
|
253
251
|
## Copyright
|
|
254
252
|
|
|
255
|
-
Copyright © 2016-
|
|
253
|
+
Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
|
|
256
254
|
|
|
257
255
|
</section>
|
|
258
256
|
|
|
@@ -265,8 +263,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
265
263
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/math-base-special-round10.svg
|
|
266
264
|
[npm-url]: https://npmjs.org/package/@stdlib/math-base-special-round10
|
|
267
265
|
|
|
268
|
-
[test-image]: https://github.com/stdlib-js/math-base-special-round10/actions/workflows/test.yml/badge.svg?branch=v0.3.
|
|
269
|
-
[test-url]: https://github.com/stdlib-js/math-base-special-round10/actions/workflows/test.yml?query=branch:v0.3.
|
|
266
|
+
[test-image]: https://github.com/stdlib-js/math-base-special-round10/actions/workflows/test.yml/badge.svg?branch=v0.3.1
|
|
267
|
+
[test-url]: https://github.com/stdlib-js/math-base-special-round10/actions/workflows/test.yml?query=branch:v0.3.1
|
|
270
268
|
|
|
271
269
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-round10/main.svg
|
|
272
270
|
[coverage-url]: https://codecov.io/github/stdlib-js/math-base-special-round10?branch=main
|
|
@@ -278,8 +276,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
278
276
|
|
|
279
277
|
-->
|
|
280
278
|
|
|
281
|
-
[chat-image]: https://img.shields.io/
|
|
282
|
-
[chat-url]: https://
|
|
279
|
+
[chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
|
|
280
|
+
[chat-url]: https://stdlib.zulipchat.com
|
|
283
281
|
|
|
284
282
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
285
283
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/math-base-special-round10",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Round a numeric value to the nearest power of 10 on a linear scale.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@stdlib/constants-float64-max-base10-exponent": "^0.2.
|
|
36
|
+
"@stdlib/constants-float64-max-base10-exponent": "^0.2.3",
|
|
37
37
|
"@stdlib/constants-float64-min-base10-exponent-subnormal": "^0.2.1",
|
|
38
|
-
"@stdlib/math-base-assert-is-infinite": "^0.2.
|
|
39
|
-
"@stdlib/math-base-assert-is-nan": "^0.2.
|
|
40
|
-
"@stdlib/math-base-napi-unary": "^0.2.
|
|
41
|
-
"@stdlib/math-base-special-ceil": "^0.2.
|
|
42
|
-
"@stdlib/math-base-special-floor": "^0.2.
|
|
43
|
-
"@stdlib/math-base-special-log10": "^0.3.
|
|
38
|
+
"@stdlib/math-base-assert-is-infinite": "^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-ceil": "^0.2.3",
|
|
42
|
+
"@stdlib/math-base-special-floor": "^0.2.4",
|
|
43
|
+
"@stdlib/math-base-special-log10": "^0.3.1",
|
|
44
44
|
"@stdlib/math-base-special-pow": "^0.3.0",
|
|
45
|
-
"@stdlib/utils-library-manifest": "^0.2.
|
|
45
|
+
"@stdlib/utils-library-manifest": "^0.2.4"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {},
|
|
48
48
|
"engines": {
|