Important: The information in this document is obsolete and should not be used for new development.
atan
You can use theatan
function to compute the arc tangent of a real number.
double_t atan (double_t x);
x
- Any floating-point number.
DESCRIPTION
Theatan
function returns the arc tangent of its argument. The return value is expressed in radians in the range [ , + ]. This function is antisymmetric.
such that for all xThetan
function performs the inverse operation .EXCEPTIONS
When x is finite and nonzero, the result of might raise one of the following exceptions:
- inexact (for all nonzero values of x)
- underflow (if the result is inexact and must be represented as a denormalized number or 0)
SPECIAL CASES
Table 10-25 shows the results when the argument to theatan
function is a zero, a NaN, or an Infinity.
Special cases for the atan
functionOperation Result Exceptions raised +0 None None NaN None[46] + Inexact - Inexact EXAMPLES
z = atan(1.0); /* z = arctan 1 = \x86/4 */ z = atan(-1.0); /* z = arctan -1 = -\x86/4. The inexact exception is raised. */
[46] If the NaN is a signaling NaN, the invalid exception is raised.