Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "number/float64/base/to-words/docs/types/index.d"

Index

Functions

Functions

Export assignment toWords

  • Splits a double-precision floating-point number into a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).

    Parameters

    • out: ArrayLike<number>

      output array

    • x: number

      input value

    Returns ArrayLike < number >

    output array

    Example

    var Uint32Array = require( `@stdlib/array/uint32` );
    
    var out = new Uint32Array( 2 );
    
    var w = toWords( out, 3.14e201 );
    // returns <Uint32Array>[ 1774486211, 2479577218 ]
    
    var bool = ( w === out );
    // returns true
  • Splits a double-precision floating-point number into a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).

    Parameters

    • x: number

      input value

    Returns ArrayLike < number >

    output array

    Example

    var w = toWords( 3.14e201 );
    // returns [ 1774486211, 2479577218 ]