@stdlib/math-base-special-ceilsd 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 +14 -16
- package/package.json +11 -11
- 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
|
@@ -88,18 +88,16 @@ v = ceilsd( 0.0313, 2, 2 );
|
|
|
88
88
|
<!-- eslint no-undef: "error" -->
|
|
89
89
|
|
|
90
90
|
```javascript
|
|
91
|
-
var
|
|
91
|
+
var uniform = require( '@stdlib/random-array-uniform' );
|
|
92
|
+
var logEachMap = require( '@stdlib/console-log-each-map' );
|
|
92
93
|
var ceilsd = require( '@stdlib/math-base-special-ceilsd' );
|
|
93
94
|
|
|
94
|
-
var
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
var opts = {
|
|
96
|
+
'dtype': 'float64'
|
|
97
|
+
};
|
|
98
|
+
var x = uniform( 100, -5000.0, 5000.0, opts );
|
|
97
99
|
|
|
98
|
-
|
|
99
|
-
x = (randu()*10000.0) - 5000.0;
|
|
100
|
-
y = ceilsd( x, 5, 10 );
|
|
101
|
-
console.log( 'x: %d. Rounded: %d.', x, y );
|
|
102
|
-
}
|
|
100
|
+
logEachMap( 'x: %0.4f. y: %d. z: %d. Rounded: %0.4f.', x, 5, 10, ceilsd );
|
|
103
101
|
```
|
|
104
102
|
|
|
105
103
|
</section>
|
|
@@ -134,7 +132,7 @@ for ( i = 0; i < 100; i++ ) {
|
|
|
134
132
|
|
|
135
133
|
#### stdlib_base_ceilsd( x, n, b )
|
|
136
134
|
|
|
137
|
-
Rounds a `numeric` value to the nearest `number` toward
|
|
135
|
+
Rounds a `numeric` value to the nearest `number` toward positive infinity with `n` significant figures.
|
|
138
136
|
|
|
139
137
|
```c
|
|
140
138
|
double out = stdlib_base_ceilsd( 0.0313, 2, 2 );
|
|
@@ -206,7 +204,7 @@ int main( void ) {
|
|
|
206
204
|
|
|
207
205
|
- <span class="package-name">[`@stdlib/math-base/special/ceil`][@stdlib/math/base/special/ceil]</span><span class="delimiter">: </span><span class="description">round a double-precision floating-point number toward positive infinity.</span>
|
|
208
206
|
- <span class="package-name">[`@stdlib/math-base/special/floorsd`][@stdlib/math/base/special/floorsd]</span><span class="delimiter">: </span><span class="description">round a numeric value to the nearest number toward negative infinity with N significant figures.</span>
|
|
209
|
-
- <span class="package-name">[`@stdlib/math-base/special/roundsd`][@stdlib/math/base/special/roundsd]</span><span class="delimiter">: </span><span class="description">round a
|
|
207
|
+
- <span class="package-name">[`@stdlib/math-base/special/roundsd`][@stdlib/math/base/special/roundsd]</span><span class="delimiter">: </span><span class="description">round a double-precision floating-point number to the nearest value with N significant figures.</span>
|
|
210
208
|
- <span class="package-name">[`@stdlib/math-base/special/truncsd`][@stdlib/math/base/special/truncsd]</span><span class="delimiter">: </span><span class="description">round a numeric value to the nearest number toward zero with N significant figures.</span>
|
|
211
209
|
|
|
212
210
|
</section>
|
|
@@ -239,7 +237,7 @@ See [LICENSE][stdlib-license].
|
|
|
239
237
|
|
|
240
238
|
## Copyright
|
|
241
239
|
|
|
242
|
-
Copyright © 2016-
|
|
240
|
+
Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
|
|
243
241
|
|
|
244
242
|
</section>
|
|
245
243
|
|
|
@@ -252,8 +250,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
252
250
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/math-base-special-ceilsd.svg
|
|
253
251
|
[npm-url]: https://npmjs.org/package/@stdlib/math-base-special-ceilsd
|
|
254
252
|
|
|
255
|
-
[test-image]: https://github.com/stdlib-js/math-base-special-ceilsd/actions/workflows/test.yml/badge.svg?branch=v0.3.
|
|
256
|
-
[test-url]: https://github.com/stdlib-js/math-base-special-ceilsd/actions/workflows/test.yml?query=branch:v0.3.
|
|
253
|
+
[test-image]: https://github.com/stdlib-js/math-base-special-ceilsd/actions/workflows/test.yml/badge.svg?branch=v0.3.1
|
|
254
|
+
[test-url]: https://github.com/stdlib-js/math-base-special-ceilsd/actions/workflows/test.yml?query=branch:v0.3.1
|
|
257
255
|
|
|
258
256
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-ceilsd/main.svg
|
|
259
257
|
[coverage-url]: https://codecov.io/github/stdlib-js/math-base-special-ceilsd?branch=main
|
|
@@ -265,8 +263,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
265
263
|
|
|
266
264
|
-->
|
|
267
265
|
|
|
268
|
-
[chat-image]: https://img.shields.io/
|
|
269
|
-
[chat-url]: https://
|
|
266
|
+
[chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
|
|
267
|
+
[chat-url]: https://stdlib.zulipchat.com
|
|
270
268
|
|
|
271
269
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
272
270
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/math-base-special-ceilsd",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Round a numeric value to the nearest number toward positive infinity with N significant figures.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@stdlib/math-base-assert-is-infinite": "^0.2.
|
|
37
|
-
"@stdlib/math-base-assert-is-nan": "^0.2.
|
|
38
|
-
"@stdlib/math-base-napi-ternary": "^0.3.
|
|
39
|
-
"@stdlib/math-base-special-abs": "^0.2.
|
|
40
|
-
"@stdlib/math-base-special-ceil": "^0.2.
|
|
41
|
-
"@stdlib/math-base-special-floor": "^0.2.
|
|
42
|
-
"@stdlib/math-base-special-ln": "^0.2.
|
|
43
|
-
"@stdlib/math-base-special-log10": "^0.3.
|
|
36
|
+
"@stdlib/math-base-assert-is-infinite": "^0.2.3",
|
|
37
|
+
"@stdlib/math-base-assert-is-nan": "^0.2.3",
|
|
38
|
+
"@stdlib/math-base-napi-ternary": "^0.3.2",
|
|
39
|
+
"@stdlib/math-base-special-abs": "^0.2.3",
|
|
40
|
+
"@stdlib/math-base-special-ceil": "^0.2.3",
|
|
41
|
+
"@stdlib/math-base-special-floor": "^0.2.4",
|
|
42
|
+
"@stdlib/math-base-special-ln": "^0.2.5",
|
|
43
|
+
"@stdlib/math-base-special-log10": "^0.3.1",
|
|
44
44
|
"@stdlib/math-base-special-pow": "^0.3.0",
|
|
45
|
-
"@stdlib/number-float64-base-exponent": "^0.2.
|
|
46
|
-
"@stdlib/utils-library-manifest": "^0.2.
|
|
45
|
+
"@stdlib/number-float64-base-exponent": "^0.2.3",
|
|
46
|
+
"@stdlib/utils-library-manifest": "^0.2.4"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {},
|
|
49
49
|
"engines": {
|