time-to-botec

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

repl.txt (871B)


      1 
      2 {{alias}}( [out,] re, im, n )
      3     Rounds a complex number to the nearest multiple of `10^n`.
      4 
      5     When operating on floating-point numbers in bases other than `2`, rounding
      6     to specified digits can be inexact.
      7 
      8     Parameters
      9     ----------
     10     out: Array|TypedArray|Object (optional)
     11         Output array.
     12 
     13     re: number
     14         Real component.
     15 
     16     im: number
     17         Imaginary component.
     18 
     19     n: integer
     20         Integer power of 10.
     21 
     22     Returns
     23     -------
     24     out: Array|TypedArray|Object
     25         Real and imaginary components.
     26 
     27     Examples
     28     --------
     29     > var out = {{alias}}( 5.555, -3.336, -2 )
     30     [ 5.56, -3.34 ]
     31 
     32     // Provide an output array:
     33     > out = new {{alias:@stdlib/array/float64}}( 2 );
     34     > var v = {{alias}}( out, 5.555, -3.336, -2 )
     35     <Float64Array>[ 5.56, -3.34 ]
     36     > var bool = ( v === out )
     37     true
     38 
     39     See Also
     40     --------
     41