index.js (1645B)
1 /** 2 * @license Apache-2.0 3 * 4 * Copyright (c) 2018 The Stdlib Authors. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 'use strict'; 20 21 /** 22 * Set the less significant 32 bits of a double-precision floating-point number. 23 * 24 * @module @stdlib/number/float64/base/set-low-word 25 * 26 * @example 27 * var setLowWord = require( '@stdlib/number/float64/base/set-low-word' ); 28 * 29 * var low = 5 >>> 0; // => 00000000000000000000000000000101 30 * 31 * var x = 3.14e201; // => 0 11010011100 01001000001011000011 10010011110010110101100010000010 32 * 33 * var y = setLowWord( x, low ); // => 0 11010011100 01001000001011000011 00000000000000000000000000000101 34 * // returns 3.139998651394392e+201 35 * 36 * @example 37 * var setLowWord = require( '@stdlib/number/float64/base/set-low-word' ); 38 * var PINF = require( '@stdlib/constants/float64/pinf' ); 39 * var NINF = require( '@stdlib/constants/float64/ninf' ); 40 * 41 * var low = 12345678; 42 * 43 * var y = setLowWord( PINF, low ); 44 * // returns NaN 45 * 46 * y = setLowWord( NINF, low ); 47 * // returns NaN 48 * 49 * y = setLowWord( NaN, low ); 50 * // returns NaN 51 */ 52 53 // MODULES // 54 55 var setLowWord = require( './main.js' ); 56 57 58 // EXPORTS // 59 60 module.exports = setLowWord;