@stdlib/math-base-special-copysignf 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 CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2024 The Stdlib Authors.
1
+ Copyright (c) 2016-2026 The Stdlib Authors.
package/README.md CHANGED
@@ -95,21 +95,18 @@ z = copysignf( -0.0, 1.0 );
95
95
  <!-- eslint no-undef: "error" -->
96
96
 
97
97
  ```javascript
98
- var randu = require( '@stdlib/random-base-randu' );
98
+ var uniform = require( '@stdlib/random-array-uniform' );
99
+ var logEachMap = require( '@stdlib/console-log-each-map' );
99
100
  var copysignf = require( '@stdlib/math-base-special-copysignf' );
100
101
 
101
- var x;
102
- var y;
103
- var z;
104
- var i;
102
+ var opts = {
103
+ 'dtype': 'float32'
104
+ };
105
+ var x = uniform( 100, -50.0, 50.0, opts );
106
+ var y = uniform( 100, -5.0, 5.0, opts );
105
107
 
106
108
  // Generate random numbers `x` and `y` and copy the sign of `y` to `x`...
107
- for ( i = 0; i < 100; i++ ) {
108
- x = (randu()*100.0) - 50.0;
109
- y = (randu()*10.0) - 5.0;
110
- z = copysignf( x, y );
111
- console.log( 'x: %d, y: %d => %d', x, y, z );
112
- }
109
+ logEachMap( 'x: %0.4f, y: %0.4f => %0.4f', x, y, copysignf );
113
110
  ```
114
111
 
115
112
  </section>
@@ -246,7 +243,7 @@ See [LICENSE][stdlib-license].
246
243
 
247
244
  ## Copyright
248
245
 
249
- Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
246
+ Copyright &copy; 2016-2026. The Stdlib [Authors][stdlib-authors].
250
247
 
251
248
  </section>
252
249
 
@@ -259,8 +256,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
259
256
  [npm-image]: http://img.shields.io/npm/v/@stdlib/math-base-special-copysignf.svg
260
257
  [npm-url]: https://npmjs.org/package/@stdlib/math-base-special-copysignf
261
258
 
262
- [test-image]: https://github.com/stdlib-js/math-base-special-copysignf/actions/workflows/test.yml/badge.svg?branch=v0.2.2
263
- [test-url]: https://github.com/stdlib-js/math-base-special-copysignf/actions/workflows/test.yml?query=branch:v0.2.2
259
+ [test-image]: https://github.com/stdlib-js/math-base-special-copysignf/actions/workflows/test.yml/badge.svg?branch=v0.2.3
260
+ [test-url]: https://github.com/stdlib-js/math-base-special-copysignf/actions/workflows/test.yml?query=branch:v0.2.3
264
261
 
265
262
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-copysignf/main.svg
266
263
  [coverage-url]: https://codecov.io/github/stdlib-js/math-base-special-copysignf?branch=main
@@ -272,8 +269,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
272
269
 
273
270
  -->
274
271
 
275
- [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
276
- [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
272
+ [chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
273
+ [chat-url]: https://stdlib.zulipchat.com
277
274
 
278
275
  [stdlib]: https://github.com/stdlib-js/stdlib
279
276
 
package/manifest.json CHANGED
@@ -1,87 +1,87 @@
1
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
- "-lm"
38
- ],
39
- "libpath": [],
40
- "dependencies": [
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
41
  "@stdlib/math-base-napi-binary",
42
42
  "@stdlib/constants-float32-abs-mask",
43
43
  "@stdlib/constants-float32-sign-mask",
44
- "@stdlib/number-float32-base-to-word",
44
+ "@stdlib/number-float32-base-to-word",
45
45
  "@stdlib/number-float32-base-from-word"
46
- ]
47
- },
48
- {
49
- "task": "benchmark",
50
- "src": [
51
- "./src/main.c"
52
- ],
53
- "include": [
54
- "./include"
55
- ],
56
- "libraries": [
57
- "-lm"
58
- ],
59
- "libpath": [],
60
- "dependencies": [
46
+ ]
47
+ },
48
+ {
49
+ "task": "benchmark",
50
+ "src": [
51
+ "./src/main.c"
52
+ ],
53
+ "include": [
54
+ "./include"
55
+ ],
56
+ "libraries": [
57
+ "-lm"
58
+ ],
59
+ "libpath": [],
60
+ "dependencies": [
61
61
  "@stdlib/constants-float32-abs-mask",
62
62
  "@stdlib/constants-float32-sign-mask",
63
63
  "@stdlib/number-float32-base-to-word",
64
64
  "@stdlib/number-float32-base-from-word"
65
- ]
66
- },
67
- {
68
- "task": "examples",
69
- "src": [
70
- "./src/main.c"
71
- ],
72
- "include": [
73
- "./include"
74
- ],
75
- "libraries": [
76
- "-lm"
77
- ],
78
- "libpath": [],
79
- "dependencies": [
65
+ ]
66
+ },
67
+ {
68
+ "task": "examples",
69
+ "src": [
70
+ "./src/main.c"
71
+ ],
72
+ "include": [
73
+ "./include"
74
+ ],
75
+ "libraries": [
76
+ "-lm"
77
+ ],
78
+ "libpath": [],
79
+ "dependencies": [
80
80
  "@stdlib/constants-float32-abs-mask",
81
81
  "@stdlib/constants-float32-sign-mask",
82
82
  "@stdlib/number-float32-base-to-word",
83
83
  "@stdlib/number-float32-base-from-word"
84
- ]
85
- }
86
- ]
84
+ ]
85
+ }
86
+ ]
87
87
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/math-base-special-copysignf",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Return a single-precision floating-point number with the magnitude of x and the sign of y.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -33,13 +33,13 @@
33
33
  "url": "https://github.com/stdlib-js/stdlib/issues"
34
34
  },
35
35
  "dependencies": {
36
- "@stdlib/constants-float32-abs-mask": "^0.2.2",
37
- "@stdlib/constants-float32-sign-mask": "^0.2.2",
38
- "@stdlib/math-base-napi-binary": "^0.3.0",
36
+ "@stdlib/constants-float32-abs-mask": "^0.2.3",
37
+ "@stdlib/constants-float32-sign-mask": "^0.2.3",
38
+ "@stdlib/math-base-napi-binary": "^0.3.3",
39
39
  "@stdlib/number-float32-base-from-word": "^0.2.2",
40
40
  "@stdlib/number-float32-base-to-word": "^0.2.2",
41
41
  "@stdlib/number-float64-base-to-float32": "^0.2.2",
42
- "@stdlib/utils-library-manifest": "^0.2.2"
42
+ "@stdlib/utils-library-manifest": "^0.2.4"
43
43
  },
44
44
  "devDependencies": {},
45
45
  "engines": {
package/src/addon.c CHANGED
@@ -19,5 +19,4 @@
19
19
  #include "stdlib/math/base/special/copysignf.h"
20
20
  #include "stdlib/math/base/napi/binary.h"
21
21
 
22
- // cppcheck-suppress shadowFunction
23
22
  STDLIB_MATH_BASE_NAPI_MODULE_FF_F( stdlib_base_copysignf )