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():
20           _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 ||
21           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L;
22           or cc -std=c99
23

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

CONFORMING TO

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

BUGS

58       Before version 2.10, the glibc implementation did not set errno to EDOM
59       when a domain error occurred.
60

SEE ALSO

62       acos(3), asin(3), atan(3), atan2(3), cos(3), ctan(3), sin(3)
63

COLOPHON

65       This page is part of release 3.53 of the Linux  man-pages  project.   A
66       description  of  the project, and information about reporting bugs, can
67       be found at http://www.kernel.org/doc/man-pages/.
68
69
70
71                                  2010-09-11                            TAN(3)
Impressum