@stdlib/number-float64-base-set-low-word 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 +6 -6
- package/dist/index.js.map +1 -1
- package/lib/index.js +1 -1
- package/manifest.json +38 -38
- package/package.json +6 -6
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2026 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -197,7 +197,7 @@ void stdlib_base_float64_set_low_word( const uint32_t low, double *x );
|
|
|
197
197
|
#include <stdio.h>
|
|
198
198
|
|
|
199
199
|
int main( void ) {
|
|
200
|
-
uint32_t low[] = { 1374389535, 1374389545, 1374389555, 1374389565 };
|
|
200
|
+
const uint32_t low[] = { 1374389535, 1374389545, 1374389555, 1374389565 };
|
|
201
201
|
double x = 3.14;
|
|
202
202
|
|
|
203
203
|
int i;
|
|
@@ -257,7 +257,7 @@ See [LICENSE][stdlib-license].
|
|
|
257
257
|
|
|
258
258
|
## Copyright
|
|
259
259
|
|
|
260
|
-
Copyright © 2016-
|
|
260
|
+
Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
|
|
261
261
|
|
|
262
262
|
</section>
|
|
263
263
|
|
|
@@ -270,8 +270,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
270
270
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/number-float64-base-set-low-word.svg
|
|
271
271
|
[npm-url]: https://npmjs.org/package/@stdlib/number-float64-base-set-low-word
|
|
272
272
|
|
|
273
|
-
[test-image]: https://github.com/stdlib-js/number-float64-base-set-low-word/actions/workflows/test.yml/badge.svg?branch=v0.2.
|
|
274
|
-
[test-url]: https://github.com/stdlib-js/number-float64-base-set-low-word/actions/workflows/test.yml?query=branch:v0.2.
|
|
273
|
+
[test-image]: https://github.com/stdlib-js/number-float64-base-set-low-word/actions/workflows/test.yml/badge.svg?branch=v0.2.3
|
|
274
|
+
[test-url]: https://github.com/stdlib-js/number-float64-base-set-low-word/actions/workflows/test.yml?query=branch:v0.2.3
|
|
275
275
|
|
|
276
276
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/number-float64-base-set-low-word/main.svg
|
|
277
277
|
[coverage-url]: https://codecov.io/github/stdlib-js/number-float64-base-set-low-word?branch=main
|
|
@@ -283,8 +283,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
283
283
|
|
|
284
284
|
-->
|
|
285
285
|
|
|
286
|
-
[chat-image]: https://img.shields.io/
|
|
287
|
-
[chat-url]: https://
|
|
286
|
+
[chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
|
|
287
|
+
[chat-url]: https://stdlib.zulipchat.com
|
|
288
288
|
|
|
289
289
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
290
290
|
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../lib/low.js", "../lib/main.js", "../lib/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isLittleEndian = require( '@stdlib/assert-is-little-endian' );\n\n\n// MAIN //\n\nvar LOW;\nif ( isLittleEndian === true ) {\n\tLOW = 0; // first index\n} else {\n\tLOW = 1; // second index\n}\n\n\n// EXPORTS //\n\nmodule.exports = LOW;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Uint32Array = require( '@stdlib/array-uint32' );\nvar Float64Array = require( '@stdlib/array-float64' );\nvar LOW = require( './low.js' );\n\n\n// VARIABLES //\n\nvar FLOAT64_VIEW = new Float64Array( 1 );\nvar UINT32_VIEW = new Uint32Array( FLOAT64_VIEW.buffer );\n\n\n// MAIN //\n\n/**\n* Sets the less significant 32 bits of a double-precision floating-point number.\n*\n* ## Notes\n*\n* ```text\n* float64 (64 bits)\n* f := fraction (significand/mantissa) (52 bits)\n* e := exponent (11 bits)\n* s := sign bit (1 bit)\n*\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Float64 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Uint32 | Uint32 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* ```\n*\n* If little endian (more significant bits last):\n*\n* ```text\n* <-- lower higher -->\n* | f7 f6 f5 f4 f3 f2 e2 | f1 |s| e1 |\n* ```\n*\n* If big endian (more significant bits first):\n*\n* ```text\n* <-- higher lower -->\n* |s| e1 e2 | f1 f2 f3 f4 f5 f6 f7 |\n* ```\n*\n* In which Uint32 can we find the lower order bits? If little endian, the first; if big endian, the second.\n*\n* ## References\n*\n* - [Open Group][1]\n*\n* [1]: http://pubs.opengroup.org/onlinepubs/9629399/chap14.htm\n*\n* @param {number} x - double\n* @param {uinteger32} low - unsigned 32-bit integer to replace the lower order word of `x`\n* @returns {number} double having the same higher order word as `x`\n*\n* @example\n* var low = 5 >>> 0; // => 00000000000000000000000000000101\n*\n* var x = 3.14e201; // => 0 11010011100 01001000001011000011 10010011110010110101100010000010\n*\n* var y = setLowWord( x, low ); // => 0 11010011100 01001000001011000011 00000000000000000000000000000101\n* // returns 3.139998651394392e+201\n*\n* @example\n* var PINF = require( '@stdlib/constants-float64-pinf' );\n* var NINF = require( '@stdlib/constants-float64-ninf' );\n*\n* var low = 12345678;\n*\n* var y = setLowWord( PINF, low );\n* // returns NaN\n*\n* y = setLowWord( NINF, low );\n* // returns NaN\n*\n* y = setLowWord( NaN, low );\n* // returns NaN\n*/\nfunction setLowWord( x, low ) {\n\tFLOAT64_VIEW[ 0 ] = x;\n\tUINT32_VIEW[ LOW ] = ( low >>> 0 ); // identity bit shift to ensure integer\n\treturn FLOAT64_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = setLowWord;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Set the less significant 32 bits of a double-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-set-low-word\n*\n* @example\n* var setLowWord = require( '@stdlib/number-float64-base-set-low-word' );\n*\n* var low = 5 >>> 0; // => 00000000000000000000000000000101\n*\n* var x = 3.14e201; // => 0 11010011100 01001000001011000011 10010011110010110101100010000010\n*\n* var y = setLowWord( x, low ); // => 0 11010011100 01001000001011000011 00000000000000000000000000000101\n* // returns 3.139998651394392e+201\n*\n* @example\n* var
|
|
4
|
+
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isLittleEndian = require( '@stdlib/assert-is-little-endian' );\n\n\n// MAIN //\n\nvar LOW;\nif ( isLittleEndian === true ) {\n\tLOW = 0; // first index\n} else {\n\tLOW = 1; // second index\n}\n\n\n// EXPORTS //\n\nmodule.exports = LOW;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Uint32Array = require( '@stdlib/array-uint32' );\nvar Float64Array = require( '@stdlib/array-float64' );\nvar LOW = require( './low.js' );\n\n\n// VARIABLES //\n\nvar FLOAT64_VIEW = new Float64Array( 1 );\nvar UINT32_VIEW = new Uint32Array( FLOAT64_VIEW.buffer );\n\n\n// MAIN //\n\n/**\n* Sets the less significant 32 bits of a double-precision floating-point number.\n*\n* ## Notes\n*\n* ```text\n* float64 (64 bits)\n* f := fraction (significand/mantissa) (52 bits)\n* e := exponent (11 bits)\n* s := sign bit (1 bit)\n*\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Float64 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Uint32 | Uint32 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* ```\n*\n* If little endian (more significant bits last):\n*\n* ```text\n* <-- lower higher -->\n* | f7 f6 f5 f4 f3 f2 e2 | f1 |s| e1 |\n* ```\n*\n* If big endian (more significant bits first):\n*\n* ```text\n* <-- higher lower -->\n* |s| e1 e2 | f1 f2 f3 f4 f5 f6 f7 |\n* ```\n*\n* In which Uint32 can we find the lower order bits? If little endian, the first; if big endian, the second.\n*\n* ## References\n*\n* - [Open Group][1]\n*\n* [1]: http://pubs.opengroup.org/onlinepubs/9629399/chap14.htm\n*\n* @param {number} x - double\n* @param {uinteger32} low - unsigned 32-bit integer to replace the lower order word of `x`\n* @returns {number} double having the same higher order word as `x`\n*\n* @example\n* var low = 5 >>> 0; // => 00000000000000000000000000000101\n*\n* var x = 3.14e201; // => 0 11010011100 01001000001011000011 10010011110010110101100010000010\n*\n* var y = setLowWord( x, low ); // => 0 11010011100 01001000001011000011 00000000000000000000000000000101\n* // returns 3.139998651394392e+201\n*\n* @example\n* var PINF = require( '@stdlib/constants-float64-pinf' );\n* var NINF = require( '@stdlib/constants-float64-ninf' );\n*\n* var low = 12345678;\n*\n* var y = setLowWord( PINF, low );\n* // returns NaN\n*\n* y = setLowWord( NINF, low );\n* // returns NaN\n*\n* y = setLowWord( NaN, low );\n* // returns NaN\n*/\nfunction setLowWord( x, low ) {\n\tFLOAT64_VIEW[ 0 ] = x;\n\tUINT32_VIEW[ LOW ] = ( low >>> 0 ); // identity bit shift to ensure integer\n\treturn FLOAT64_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = setLowWord;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Set the less significant 32 bits of a double-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-set-low-word\n*\n* @example\n* var setLowWord = require( '@stdlib/number-float64-base-set-low-word' );\n*\n* var low = 5 >>> 0; // => 00000000000000000000000000000101\n*\n* var x = 3.14e201; // => 0 11010011100 01001000001011000011 10010011110010110101100010000010\n*\n* var y = setLowWord( x, low ); // => 0 11010011100 01001000001011000011 00000000000000000000000000000101\n* // returns 3.139998651394392e+201\n*\n* @example\n* var PINF = require( '@stdlib/constants-float64-pinf' );\n* var NINF = require( '@stdlib/constants-float64-ninf' );\n* var setLowWord = require( '@stdlib/number-float64-base-set-low-word' );\n*\n* var low = 12345678;\n*\n* var y = setLowWord( PINF, low );\n* // returns NaN\n*\n* y = setLowWord( NINF, low );\n* // returns NaN\n*\n* y = setLowWord( NaN, low );\n* // returns NaN\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
|
|
5
5
|
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAiB,QAAS,iCAAkC,EAK5DC,EACCD,IAAmB,GACvBC,EAAM,EAENA,EAAM,EAMPF,EAAO,QAAUE,ICrCjB,IAAAC,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAc,QAAS,sBAAuB,EAC9CC,EAAe,QAAS,uBAAwB,EAChDC,EAAM,IAKNC,EAAe,IAAIF,EAAc,CAAE,EACnCG,EAAc,IAAIJ,EAAaG,EAAa,MAAO,EAwEvD,SAASE,EAAYC,EAAGC,EAAM,CAC7B,OAAAJ,EAAc,CAAE,EAAIG,EACpBF,EAAaF,CAAI,EAAMK,IAAQ,EACxBJ,EAAc,CAAE,CACxB,CAKAJ,EAAO,QAAUM,ICzDjB,IAAIG,EAAO,IAKX,OAAO,QAAUA",
|
|
6
6
|
"names": ["require_low", "__commonJSMin", "exports", "module", "isLittleEndian", "LOW", "require_main", "__commonJSMin", "exports", "module", "Uint32Array", "Float64Array", "LOW", "FLOAT64_VIEW", "UINT32_VIEW", "setLowWord", "x", "low", "main"]
|
|
7
7
|
}
|
package/lib/index.js
CHANGED
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
* // returns 3.139998651394392e+201
|
|
35
35
|
*
|
|
36
36
|
* @example
|
|
37
|
-
* var setLowWord = require( '@stdlib/number-float64-base-set-low-word' );
|
|
38
37
|
* var PINF = require( '@stdlib/constants-float64-pinf' );
|
|
39
38
|
* var NINF = require( '@stdlib/constants-float64-ninf' );
|
|
39
|
+
* var setLowWord = require( '@stdlib/number-float64-base-set-low-word' );
|
|
40
40
|
*
|
|
41
41
|
* var low = 12345678;
|
|
42
42
|
*
|
package/manifest.json
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
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
|
-
|
|
2
|
+
"options": {},
|
|
3
|
+
"fields": [
|
|
4
|
+
{
|
|
5
|
+
"field": "src",
|
|
6
|
+
"resolve": true,
|
|
7
|
+
"relative": true
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"field": "include",
|
|
11
|
+
"resolve": true,
|
|
12
|
+
"relative": true
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"field": "libraries",
|
|
16
|
+
"resolve": false,
|
|
17
|
+
"relative": false
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"field": "libpath",
|
|
21
|
+
"resolve": true,
|
|
22
|
+
"relative": false
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"confs": [
|
|
26
|
+
{
|
|
27
|
+
"src": [
|
|
28
|
+
"./src/main.c"
|
|
29
|
+
],
|
|
30
|
+
"include": [
|
|
31
|
+
"./include"
|
|
32
|
+
],
|
|
33
|
+
"libraries": [],
|
|
34
|
+
"libpath": [],
|
|
35
|
+
"dependencies": [
|
|
36
|
+
"@stdlib/number-float64-base-to-words"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
40
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/number-float64-base-set-low-word",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Set the less significant 32 bits of a double-precision floating-point number.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@stdlib/array-float64": "^0.2.
|
|
37
|
-
"@stdlib/array-uint32": "^0.2.
|
|
38
|
-
"@stdlib/assert-is-little-endian": "^0.2.
|
|
39
|
-
"@stdlib/number-float64-base-to-words": "^0.2.
|
|
40
|
-
"@stdlib/utils-library-manifest": "^0.2.
|
|
36
|
+
"@stdlib/array-float64": "^0.2.2",
|
|
37
|
+
"@stdlib/array-uint32": "^0.2.3",
|
|
38
|
+
"@stdlib/assert-is-little-endian": "^0.2.2",
|
|
39
|
+
"@stdlib/number-float64-base-to-words": "^0.2.2",
|
|
40
|
+
"@stdlib/utils-library-manifest": "^0.2.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {},
|
|
43
43
|
"engines": {
|