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           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
21               || /* Since glibc 2.19: */ _DEFAULT_SOURCE
22               || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
23

DESCRIPTION

25       These functions return the tangent of x, where x is given in radians.
26

RETURN VALUE

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

ERRORS

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

ATTRIBUTES

53       For  an  explanation  of  the  terms  used   in   this   section,   see
54       attributes(7).
55
56       ┌──────────────────────┬───────────────┬─────────┐
57Interface             Attribute     Value   
58       ├──────────────────────┼───────────────┼─────────┤
59tan(), tanf(), tanl() │ Thread safety │ MT-Safe │
60       └──────────────────────┴───────────────┴─────────┘

CONFORMING TO

62       C99, POSIX.1-2001, POSIX.1-2008.
63
64       The variant returning double also conforms to SVr4, 4.3BSD, C89.
65

BUGS

67       Before version 2.10, the glibc implementation did not set errno to EDOM
68       when a domain error occurred.
69

SEE ALSO

71       acos(3), asin(3), atan(3), atan2(3), cos(3), ctan(3), sin(3)
72

COLOPHON

74       This page is part of release 4.16 of the Linux  man-pages  project.   A
75       description  of  the project, information about reporting bugs, and the
76       latest    version    of    this    page,    can     be     found     at
77       https://www.kernel.org/doc/man-pages/.
78
79
80
81                                  2017-09-15                            TAN(3)
Impressum