]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3p/atan.3p
Import of man-pages 1.70
[thirdparty/man-pages.git] / man3p / atan.3p
1 .\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
2 .TH "ATAN" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
3 .\" atan
4 .SH NAME
5 atan, atanf, atanl \- arc tangent function
6 .SH SYNOPSIS
7 .LP
8 \fB#include <math.h>
9 .br
10 .sp
11 double atan(double\fP \fIx\fP\fB);
12 .br
13 float atanf(float\fP \fIx\fP\fB);
14 .br
15 long double atanl(long double\fP \fIx\fP\fB);
16 .br
17 \fP
18 .SH DESCRIPTION
19 .LP
20 These functions shall compute the principal value of the arc tangent
21 of their argument \fIx\fP.
22 .LP
23 An application wishing to check for error situations should set \fIerrno\fP
24 to zero and call
25 \fIfeclearexcept\fP(FE_ALL_EXCEPT) before calling these functions.
26 On return, if \fIerrno\fP is non-zero or
27 \fIfetestexcept\fP(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
28 is non-zero, an error has occurred.
29 .SH RETURN VALUE
30 .LP
31 Upon successful completion, these functions shall return the arc tangent
32 of \fIx\fP in the range [-pi/2,pi/2] radians.
33 .LP
34 If
35 \fIx\fP is NaN, a NaN shall be returned.
36 .LP
37 If \fIx\fP is \(+-0, \fIx\fP shall be returned.
38 .LP
39 If \fIx\fP is \(+-Inf, \(+-pi/2 shall be returned.
40 .LP
41 If \fIx\fP is subnormal, a range error may occur and \fIx\fP should
42 be returned.
43 .SH ERRORS
44 .LP
45 These functions may fail if:
46 .TP 7
47 Range\ Error
48 The value of \fIx\fP is subnormal.
49 .LP
50 If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
51 then \fIerrno\fP shall be set to [ERANGE]. If the
52 integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero,
53 then the underflow floating-point exception shall be
54 raised.
55 .sp
56 .LP
57 \fIThe following sections are informative.\fP
58 .SH EXAMPLES
59 .LP
60 None.
61 .SH APPLICATION USAGE
62 .LP
63 On error, the expressions (math_errhandling & MATH_ERRNO) and (math_errhandling
64 & MATH_ERREXCEPT) are independent of
65 each other, but at least one of them must be non-zero.
66 .SH RATIONALE
67 .LP
68 None.
69 .SH FUTURE DIRECTIONS
70 .LP
71 None.
72 .SH SEE ALSO
73 .LP
74 \fIatan2\fP() , \fIfeclearexcept\fP() , \fIfetestexcept\fP() , \fIisnan\fP()
75 , \fItan\fP() , the
76 Base Definitions volume of IEEE\ Std\ 1003.1-2001, Section 4.18, Treatment
77 of Error Conditions for Mathematical Functions, \fI<math.h>\fP
78 .SH COPYRIGHT
79 Portions of this text are reprinted and reproduced in electronic form
80 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
81 -- Portable Operating System Interface (POSIX), The Open Group Base
82 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
83 Electrical and Electronics Engineers, Inc and The Open Group. In the
84 event of any discrepancy between this version and the original IEEE and
85 The Open Group Standard, the original IEEE and The Open Group Standard
86 is the referee document. The original Standard can be obtained online at
87 http://www.opengroup.org/unix/online.html .