1TAN(3)                     Linux Programmer's Manual                    TAN(3)
2
3
4

NAME

6       tan, tanf, tanl - tangent function
7

SYNOPSIS

9       #include <math.h>
10
11       double tan(double x);
12       float tanf(float x);
13       long double tanl(long double x);
14
15       Link with -lm.
16
17   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
18
19       tanf(), tanl(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 ||
20       _ISOC99_SOURCE; or cc -std=c99
21

DESCRIPTION

23       The tan() function returns the tangent of x, where x is given in  radi‐
24       ans.
25

RETURN VALUE

27       On success, these functions return the tangent of x.
28
29       If x is a NaN, a NaN is returned.
30
31       If  x is positive infinity or negative infinity, a domain error occurs,
32       and a NaN is returned.
33
34       If the correct result would overflow, a range  error  occurs,  and  the
35       functions  return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with
36       the mathematically correct sign.
37

ERRORS

39       See math_error(7) for information on how to determine whether an  error
40       has occurred when calling these functions.
41
42       The following errors can occur:
43
44       Domain error: x is an infinity
45              An invalid floating-point exception (FE_INVALID) is raised.
46
47       Range error: result overflow
48              An overflow floating-point exception (FE_OVERFLOW) is raised.
49
50       These functions do not set errno.
51

CONFORMING TO

53       C99, POSIX.1-2001.  The variant returning double also conforms to SVr4,
54       4.3BSD, C89.
55

SEE ALSO

57       acos(3), asin(3), atan(3), atan2(3), cos(3), ctan(3), sin(3)
58

COLOPHON

60       This page is part of release 3.22 of the Linux  man-pages  project.   A
61       description  of  the project, and information about reporting bugs, can
62       be found at http://www.kernel.org/doc/man-pages/.
63
64
65
66                                  2008-08-05                            TAN(3)
Impressum