time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (1129B)


      1 
      2 {{alias}}( x )
      3     Returns a string giving the literal bit representation of an unsigned 32-bit
      4     integer.
      5 
      6     Except for typed arrays, JavaScript does not provide native user support for
      7     unsigned 32-bit integers. According to the ECMAScript standard, `number`
      8     values correspond to double-precision floating-point numbers. While this
      9     function is intended for unsigned 32-bit integers, the function will accept
     10     floating-point values and represent the values as if they are unsigned
     11     32-bit integers. Accordingly, care should be taken to ensure that only
     12     nonnegative integer values less than `4,294,967,296` (`2^32`) are provided.
     13 
     14     Parameters
     15     ----------
     16     x: integer
     17         Input value.
     18 
     19     Returns
     20     -------
     21     str: string
     22         Bit representation.
     23 
     24     Examples
     25     --------
     26     > var a = new {{alias:@stdlib/array/uint32}}( [ 1, 4, 9 ] );
     27     > var str = {{alias}}( a[ 0 ] )
     28     '00000000000000000000000000000001'
     29     > str = {{alias}}( a[ 1 ] )
     30     '00000000000000000000000000000100'
     31     > str = {{alias}}( a[ 2 ] )
     32     '00000000000000000000000000001001'
     33 
     34     See Also
     35     --------
     36