Method: Math#tan
- Defined in:
- math.c
#tan(x) ⇒ Float (private)
Returns the tangent of x
in radians.
-
Domain:
(-INFINITY, INFINITY)
. -
Range:
(-INFINITY, INFINITY)
.
Examples:
tan(-PI) # => 1.2246467991473532e-16 # -0.0000000000000001
tan(-PI/2) # => -1.633123935319537e+16 # -16331239353195370.0
tan(0.0) # => 0.0
tan(PI/2) # => 1.633123935319537e+16 # 16331239353195370.0
tan(PI) # => -1.2246467991473532e-16 # -0.0000000000000001
167 168 169 170 171 |
# File 'math.c', line 167
static VALUE
math_tan(VALUE unused_obj, VALUE x)
{
return DBL2NUM(tan(Get_Double(x)));
}
|