1atan2(3M)               Mathematical Library Functions               atan2(3M)
2
3
4

NAME

6       atan2, atan2f, atan2l - arc tangent function
7

SYNOPSIS

9       c99 [ flag... ] file... -lm [ library... ]
10       #include <math.h>
11
12       double atan2(double y, double x);
13
14
15       float atan2f(float y, float x);
16
17
18       long double atan2l(long double y, long double x);
19
20

DESCRIPTION

22       These  functions compute the principal value of the arc tangent of y/x,
23       using the signs of both arguments to  determine  the  quadrant  of  the
24       return value.
25

RETURN VALUES

27       Upon  successful  completion, these functions return the arc tangent of
28       y/x in the range [ −pi,pi ] radians.
29
30
31       If y is ±0 and x is < 0, ±pi is returned.
32
33
34       If y is ±0 and x is > 0, ±0 is returned.
35
36
37       If y is < 0 and x is ±0, −pi/2 is returned.
38
39
40       If y is > 0 and x is ±0, pi/2 is returned.
41
42
43       If x is 0, a pole error does not occur.
44
45
46       If either x or y is NaN, a NaN is returned.
47
48
49       If y is ±0 and x is -0, ±pi is returned.
50
51
52       If y is ±0 and x is +0, ±0 is returned.
53
54
55       For finite values of ±y > 0, if x is −Inf,  ±pi is returned.
56
57
58       For finite values of ±y > 0, if x is +Inf,  ±0 is returned.
59
60
61       For finite values of x, if y is ±Inf, ±pi/2 is returned.
62
63
64       If y is ±Inf and x is −Inf, ±3pi/4 is returned.
65
66
67       If y is ±Inf and x is +Inf, ±pi/4 is returned.
68
69
70       If both arguments are 0, a domain error does not occur.
71

ERRORS

73       No errors are defined.
74

ATTRIBUTES

76       See attributes(5) for descriptions of the following attributes:
77
78
79
80
81       ┌─────────────────────────────┬─────────────────────────────┐
82       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
83       ├─────────────────────────────┼─────────────────────────────┤
84       │Interface Stability          │Standard                     │
85       ├─────────────────────────────┼─────────────────────────────┤
86       │MT-Level                     │MT-Safe                      │
87       └─────────────────────────────┴─────────────────────────────┘
88

SEE ALSO

90       atan(3M), isnan(3M), math.h(3HEAD)tan(3M), attributes(5), standards(5)
91
92
93
94SunOS 5.11                        12 Jul 2006                        atan2(3M)
Impressum