time-to-botec

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

repl.txt (721B)


      1 
      2 {{alias}}( x, y )
      3     Computes `x - nπ/2 = r`.
      4 
      5     The function returns `n` and stores the remainder `r` as the two numbers
      6     `y[0]` and `y[1]`, such that `y[0] + y[1] = r`.
      7 
      8     For input values larger than `2^20 * π/2` in magnitude, the function only
      9     returns the last three binary digits of `n` and not the full result.
     10 
     11     Parameters
     12     ----------
     13     x: number
     14         Input value.
     15 
     16     y: Array|TypedArray|Object
     17         Remainder elements.
     18 
     19     Returns
     20     -------
     21     n: integer
     22         Factor of `π/2`.
     23 
     24     Examples
     25     --------
     26     > var y = [ 0.0, 0.0 ];
     27     > var n = {{alias}}( 128.0, y )
     28     81
     29     > var y1 = y[ 0 ]
     30     ~0.765
     31     > var y2 = y[ 1 ]
     32     ~3.618e-17
     33 
     34 
     35     See Also
     36     --------
     37