@stdlib/math-base-special-truncf 0.2.2 → 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 +13 -13
- package/include/stdlib/math/base/special/truncf.h +0 -3
- package/manifest.json +71 -71
- package/package.json +5 -5
- /package/src/{truncf.c → main.c} +0 -0
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2026 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -91,16 +91,16 @@ v = truncf( -Infinity );
|
|
|
91
91
|
<!-- eslint no-undef: "error" -->
|
|
92
92
|
|
|
93
93
|
```javascript
|
|
94
|
-
var
|
|
94
|
+
var uniform = require( '@stdlib/random-array-uniform' );
|
|
95
|
+
var logEachMap = require( '@stdlib/console-log-each-map' );
|
|
95
96
|
var truncf = require( '@stdlib/math-base-special-truncf' );
|
|
96
97
|
|
|
97
|
-
var
|
|
98
|
-
|
|
98
|
+
var opts = {
|
|
99
|
+
'dtype': 'float32'
|
|
100
|
+
};
|
|
101
|
+
var x = uniform( 100, -50.0, 50.0, opts );
|
|
99
102
|
|
|
100
|
-
|
|
101
|
-
x = (randu()*100.0) - 50.0;
|
|
102
|
-
console.log( 'trunc(%d) = %d', x, truncf( x ) );
|
|
103
|
-
}
|
|
103
|
+
logEachMap( 'truncf(%0.4f) = %0.4f', x, truncf );
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
</section>
|
|
@@ -201,7 +201,7 @@ int main( void ) {
|
|
|
201
201
|
## See Also
|
|
202
202
|
|
|
203
203
|
- <span class="package-name">[`@stdlib/math-base/special/ceilf`][@stdlib/math/base/special/ceilf]</span><span class="delimiter">: </span><span class="description">round a single-precision floating-point number toward positive infinity.</span>
|
|
204
|
-
- <span class="package-name">[`@stdlib/math-base/special/floorf`][@stdlib/math/base/special/floorf]</span><span class="delimiter">: </span><span class="description">round a single-precision floating-point
|
|
204
|
+
- <span class="package-name">[`@stdlib/math-base/special/floorf`][@stdlib/math/base/special/floorf]</span><span class="delimiter">: </span><span class="description">round a single-precision floating-point number toward negative infinity.</span>
|
|
205
205
|
- <span class="package-name">[`@stdlib/math-base/special/trunc`][@stdlib/math/base/special/trunc]</span><span class="delimiter">: </span><span class="description">round a double-precision floating-point number toward zero.</span>
|
|
206
206
|
|
|
207
207
|
</section>
|
|
@@ -234,7 +234,7 @@ See [LICENSE][stdlib-license].
|
|
|
234
234
|
|
|
235
235
|
## Copyright
|
|
236
236
|
|
|
237
|
-
Copyright © 2016-
|
|
237
|
+
Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
|
|
238
238
|
|
|
239
239
|
</section>
|
|
240
240
|
|
|
@@ -247,8 +247,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
247
247
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/math-base-special-truncf.svg
|
|
248
248
|
[npm-url]: https://npmjs.org/package/@stdlib/math-base-special-truncf
|
|
249
249
|
|
|
250
|
-
[test-image]: https://github.com/stdlib-js/math-base-special-truncf/actions/workflows/test.yml/badge.svg?branch=v0.2.
|
|
251
|
-
[test-url]: https://github.com/stdlib-js/math-base-special-truncf/actions/workflows/test.yml?query=branch:v0.2.
|
|
250
|
+
[test-image]: https://github.com/stdlib-js/math-base-special-truncf/actions/workflows/test.yml/badge.svg?branch=v0.2.3
|
|
251
|
+
[test-url]: https://github.com/stdlib-js/math-base-special-truncf/actions/workflows/test.yml?query=branch:v0.2.3
|
|
252
252
|
|
|
253
253
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-truncf/main.svg
|
|
254
254
|
[coverage-url]: https://codecov.io/github/stdlib-js/math-base-special-truncf?branch=main
|
|
@@ -260,8 +260,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
260
260
|
|
|
261
261
|
-->
|
|
262
262
|
|
|
263
|
-
[chat-image]: https://img.shields.io/
|
|
264
|
-
[chat-url]: https://
|
|
263
|
+
[chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
|
|
264
|
+
[chat-url]: https://stdlib.zulipchat.com
|
|
265
265
|
|
|
266
266
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
267
267
|
|
package/manifest.json
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
+
"-lm"
|
|
38
|
+
],
|
|
39
|
+
"libpath": [],
|
|
40
|
+
"dependencies": [
|
|
41
|
+
"@stdlib/math-base-napi-unary"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"task": "benchmark",
|
|
46
|
+
"src": [
|
|
47
|
+
"./src/main.c"
|
|
48
|
+
],
|
|
49
|
+
"include": [
|
|
50
|
+
"./include"
|
|
51
|
+
],
|
|
52
|
+
"libraries": [
|
|
53
|
+
"-lm"
|
|
54
|
+
],
|
|
55
|
+
"libpath": [],
|
|
56
|
+
"dependencies": []
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"task": "examples",
|
|
60
|
+
"src": [
|
|
61
|
+
"./src/main.c"
|
|
62
|
+
],
|
|
63
|
+
"include": [
|
|
64
|
+
"./include"
|
|
65
|
+
],
|
|
66
|
+
"libraries": [
|
|
67
|
+
"-lm"
|
|
68
|
+
],
|
|
69
|
+
"libpath": [],
|
|
70
|
+
"dependencies": []
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
73
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/math-base-special-truncf",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Round a single-precision floating-point number toward zero.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -33,10 +33,10 @@
|
|
|
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/math-base-special-ceilf": "^0.2.
|
|
38
|
-
"@stdlib/math-base-special-floorf": "^0.2.
|
|
39
|
-
"@stdlib/utils-library-manifest": "^0.2.
|
|
36
|
+
"@stdlib/math-base-napi-unary": "^0.2.6",
|
|
37
|
+
"@stdlib/math-base-special-ceilf": "^0.2.2",
|
|
38
|
+
"@stdlib/math-base-special-floorf": "^0.2.3",
|
|
39
|
+
"@stdlib/utils-library-manifest": "^0.2.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {},
|
|
42
42
|
"engines": {
|
/package/src/{truncf.c → main.c}
RENAMED
|
File without changes
|