diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml index f4eda1e..2bcf0cd 100644 --- a/.github/workflows/test_coverage.yml +++ b/.github/workflows/test_coverage.yml @@ -119,7 +119,6 @@ jobs: uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 with: status: ${{ job.status }} - steps: ${{ toJson(steps) }} channel: '#npm-ci' if: failure() diff --git a/dist/index.js.map b/dist/index.js.map index c341af0..e5756e8 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../lib/main.js", "../lib/index.js"], - "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 getWord = require( '@stdlib/number-float32-base-to-word' );\n\n\n// VARIABLES //\n\n// Significand mask: 0 00000000 11111111111111111111111\nvar MASK = 0x007fffff; // TODO: consider making an external constant\n\n\n// MAIN //\n\n/**\n* Returns an integer corresponding to the significand of a single-precision floating-point number.\n*\n* @param {number} x - single-precision floating-point number\n* @returns {uinteger32} significand\n*\n* @example\n* var toFloat32 = require( '@stdlib/number-float64-base-to-float32' );\n* var s = significandf( toFloat32( 3.14e34 ) ); // => 10000011000010001110111\n* // returns 4293751\n*\n* @example\n* var toFloat32 = require( '@stdlib/number-float64-base-to-float32' );\n* var s = significandf( toFloat32( 3.14e-34 ) ); // => 10100001011000001010101\n* // returns 5288021\n*\n* @example\n* var toFloat32 = require( '@stdlib/number-float64-base-to-float32' );\n* var s = significandf( toFloat32( -3.14 ) ); // => 10010001111010111000011\n* // returns 4781507\n*\n* @example\n* var s = significandf( 0.0 ); // => 00000000000000000000000\n* // returns 0\n*\n* @example\n* var s = significandf( NaN ); // => 10000000000000000000000\n* // returns 4194304\n*/\nfunction significandf( x ) {\n\t// Convert `x` to an unsigned 32-bit integer corresponding to the IEEE 754 binary representation:\n\tvar w = getWord( x );\n\n\t// Apply a mask to isolate only the significand bits:\n\treturn w & MASK;\n}\n\n\n// EXPORTS //\n\nmodule.exports = significandf;\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* Return an integer corresponding to the significand of a single-precision floating-point number.\n*\n* @module @stdlib/number-float32-base-significand\n*\n* @example\n* var significandf = require( '@stdlib/number-float32-base-significand' );\n*\n* var toFloat32 = require( '@stdlib/number-float64-base-to-float32' );\n*\n* var s = significandf( toFloat32( 3.14e34 ) ); // => 10000011000010001110111\n* // returns 4293751\n*\n* s = significandf( toFloat32( 3.14e-34 ) ); // => 10100001011000001010101\n* // returns 5288021\n*\n* s = significandf( toFloat32( -3.14 ) ); // => 10010001111010111000011\n* // returns 4781507\n*\n* s = significandf( 0.0 ); // => 00000000000000000000000\n* // returns 0\n*\n* s = significandf( NaN ); // => 10000000000000000000000\n* // returns 4194304\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"], - "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAU,QAAS,qCAAsC,EAMzDC,EAAO,QAkCX,SAASC,EAAcC,EAAI,CAE1B,IAAIC,EAAIJ,EAASG,CAAE,EAGnB,OAAOC,EAAIH,CACZ,CAKAF,EAAO,QAAUG,ICzBjB,IAAIG,EAAO,IAKX,OAAO,QAAUA", + "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 getWord = require( '@stdlib/number-float32-base-to-word' );\n\n\n// VARIABLES //\n\n// Significand mask: 0 00000000 11111111111111111111111\nvar MASK = 0x007fffff; // TODO: consider making an external constant\n\n\n// MAIN //\n\n/**\n* Returns an integer corresponding to the significand of a single-precision floating-point number.\n*\n* @param {number} x - single-precision floating-point number\n* @returns {uinteger32} significand\n*\n* @example\n* var toFloat32 = require( '@stdlib/number-float64-base-to-float32' );\n* var s = significandf( toFloat32( 3.14e34 ) ); // => 10000011000010001110111\n* // returns 4293751\n*\n* @example\n* var toFloat32 = require( '@stdlib/number-float64-base-to-float32' );\n* var s = significandf( toFloat32( 3.14e-34 ) ); // => 10100001011000001010101\n* // returns 5288021\n*\n* @example\n* var toFloat32 = require( '@stdlib/number-float64-base-to-float32' );\n* var s = significandf( toFloat32( -3.14 ) ); // => 10010001111010111000011\n* // returns 4781507\n*\n* @example\n* var s = significandf( 0.0 ); // => 00000000000000000000000\n* // returns 0\n*\n* @example\n* var s = significandf( NaN ); // => 10000000000000000000000\n* // returns 4194304\n*/\nfunction significandf( x ) {\n\t// Convert `x` to an unsigned 32-bit integer corresponding to the IEEE 754 binary representation:\n\tvar w = getWord( x );\n\n\t// Apply a mask to isolate only the significand bits:\n\treturn w & MASK;\n}\n\n\n// EXPORTS //\n\nmodule.exports = significandf;\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* Return an integer corresponding to the significand of a single-precision floating-point number.\n*\n* @module @stdlib/number-float32-base-significand\n*\n* @example\n* var toFloat32 = require( '@stdlib/number-float64-base-to-float32' );\n* var significandf = require( '@stdlib/number-float32-base-significand' );\n*\n* var s = significandf( toFloat32( 3.14e34 ) ); // => 10000011000010001110111\n* // returns 4293751\n*\n* s = significandf( toFloat32( 3.14e-34 ) ); // => 10100001011000001010101\n* // returns 5288021\n*\n* s = significandf( toFloat32( -3.14 ) ); // => 10010001111010111000011\n* // returns 4781507\n*\n* s = significandf( 0.0 ); // => 00000000000000000000000\n* // returns 0\n*\n* s = significandf( NaN ); // => 10000000000000000000000\n* // returns 4194304\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"], + "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAU,QAAS,qCAAsC,EAMzDC,EAAO,QAkCX,SAASC,EAAcC,EAAI,CAE1B,IAAIC,EAAIJ,EAASG,CAAE,EAGnB,OAAOC,EAAIH,CACZ,CAKAF,EAAO,QAAUG,IC1BjB,IAAIG,EAAO,IAKX,OAAO,QAAUA", "names": ["require_main", "__commonJSMin", "exports", "module", "getWord", "MASK", "significandf", "x", "w", "main"] } diff --git a/lib/index.js b/lib/index.js index 2c1e687..901d4e8 100644 --- a/lib/index.js +++ b/lib/index.js @@ -24,9 +24,8 @@ * @module @stdlib/number-float32-base-significand * * @example -* var significandf = require( '@stdlib/number-float32-base-significand' ); -* * var toFloat32 = require( '@stdlib/number-float64-base-to-float32' ); +* var significandf = require( '@stdlib/number-float32-base-significand' ); * * var s = significandf( toFloat32( 3.14e34 ) ); // => 10000011000010001110111 * // returns 4293751 @@ -34,7 +33,7 @@ * s = significandf( toFloat32( 3.14e-34 ) ); // => 10100001011000001010101 * // returns 5288021 * -* s = significandf( toFloat32( -3.14 ) ); // => 10010001111010111000011 +* s = significandf( toFloat32( -3.14 ) ); // => 10010001111010111000011 * // returns 4781507 * * s = significandf( 0.0 ); // => 00000000000000000000000 diff --git a/lib/native.js b/lib/native.js index 8c45261..63d918a 100644 --- a/lib/native.js +++ b/lib/native.js @@ -41,7 +41,7 @@ var addon = require( './../src/addon.node' ); * s = significandf( toFloat32( 3.14e-34 ) ); // => 10100001011000001010101 * // returns 5288021 * -* s = significandf( toFloat32( -3.14 ) ); // => 10010001111010111000011 +* s = significandf( toFloat32( -3.14 ) ); // => 10010001111010111000011 * // returns 4781507 */ function significandf( x ) {