The tan function

Name

tan -- 

Synopsis

#include <math.h>

double tan (double x );

Description

The tan function returns the tangent of x (measured in radians).

Returns

The tan function returns the tangent value.

Implementation Notes

Over the range -pi/4 to +pi/4, the absolute error is less than 2 * DBL_EPSILON. The absolute error increases considerably as the argument approaches pi/2, or -pi/2.
Where the argument is close to any other odd multiple of pi/2, then floating point overflow may be detected and HUGE_VAL or -HUGE_VAL will be returned. If the corresponding interrupt is unmasked then the signal SIGFPE will be raised.