time-to-botec

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

repl.txt (1257B)


      1 
      2 {{alias}}( x, y, k )
      3     Computes the tangent of a number on `[-π/4, π/4]`.
      4 
      5     For increased accuracy, the number for which the tangent 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 numbers `x` and `y` must satisfy `|y| < 0.5 * ulp( x )`.
     10 
     11     If either `x` or `y` 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     k: integer
     22         If `k=1`, the function returns `tan(x+y)`. If `k=-1`, the function
     23         returns the negative inverse `-1/tan(x+y)`.
     24 
     25     Returns
     26     -------
     27     out: number
     28         Tangent.
     29 
     30     Examples
     31     --------
     32     > var out = {{alias}}( {{alias:@stdlib/constants/float64/pi}}/4.0, 0.0, 1 )
     33     ~1.0
     34     > out = {{alias}}( {{alias:@stdlib/constants/float64/pi}}/4.0, 0.0, -1 )
     35     ~-1.0
     36     > out = {{alias}}( {{alias:@stdlib/constants/float64/pi}}/6.0, 0.0, 1 )
     37     ~0.577
     38     > out = {{alias}}( 0.664, 5.288e-17, 1 )
     39     ~0.783
     40 
     41     > out = {{alias}}( NaN, 0.0, 1 )
     42     NaN
     43     > out = {{alias}}( 3.0, NaN, 1 )
     44     NaN
     45     > out = {{alias}}( 3.0, 0.0, NaN )
     46     NaN
     47 
     48     See Also
     49     --------
     50