Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

tan, tanf, tanh - compute tangent

&pagelevel(4)&pagelevel

Syntax

#include <math.h>

double tan(double x);
C11
float tanf(float x);
long double tanl(long double x); (End) 

Description

These functions compute the trigonometric function tangent of a floating-point number x (within the permissible range of floating-point numbers).

x is the floating-point number, specified in radians.

Return val.

tan(x)

Tangent of x if successful.


+/-HUGE_VAL
+/-HUGE_VALF
+/-HUGE_VALL

depending on the function type and the sign of x, if an overflow occurs.
errno is set to indicate the error.

Errors

tan() will fail if:

ERANGE      The value of x causes an overflow.

See also

atan(), cos(), sin(), tanh(), math.h.