tan, tanf, tanl - tangent function
#include <math.h>
double tan(double x);
float tanf(float x);
long double tanl(long double x);
Link with -lm
.
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
These functions return the tangent of x
, where x
is given in radians.
On success, these functions return the tangent of x
.
If x
is a NaN, a NaN is returned.
If x
is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.
If the correct result would overflow, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the mathematically correct sign.