time-to-botec

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

repl.txt (863B)


      1 
      2 {{alias}}( x, y )
      3     Computes the cosine of a number on `[-π/4, π/4]`.
      4 
      5     For increased accuracy, the number for which the cosine should be evaluated
      6     can be supplied as a double-double number (i.e., a non-evaluated sum of two
      7     double-precision floating-point numbers `x` and `y`).
      8 
      9     The two numbers must satisfy `|y| < 0.5 * ulp( x )`.
     10 
     11     If either argument is `NaN`, the function returns `NaN`.
     12 
     13     Parameters
     14     ----------
     15     x: number
     16         Input value (in radians).
     17 
     18     y: number
     19         Tail of `x`.
     20 
     21     Returns
     22     -------
     23     out: number
     24         Cosine.
     25 
     26     Examples
     27     --------
     28     > var out = {{alias}}( 0.0, 0.0 )
     29     ~1.0
     30     > out = {{alias}}( {{alias:@stdlib/constants/float64/pi}}/6.0, 0.0 )
     31     ~0.866
     32     > out = {{alias}}( 0.785, -1.144e-17 )
     33     ~0.707
     34     > out = {{alias}}( NaN )
     35     NaN
     36 
     37     See Also
     38     --------
     39