[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

atan, atanf, or atanl Subroutine

Purpose

Computes the arc tangent.

Syntax

#include <math.h>

float atanf (x)
float x;

long double atanl (x)
long double x;

double atan (x)
double x;

Description

The atanf, atanl, and atan subroutines compute the principal value of the arc tangent of the x parameter.

An application wishing to check for error situations should set the errno global variable to zero and call feclearexcept(FE_ALL_EXCEPT) before calling these functions. On return, if errno is nonzero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is nonzero, an error has occurred.

Parameters

x Specifies the value to be computed.

Return Values

Upon successful completion, the atanf, atanl, and atan subroutines return the arc tangent of x in the range [-pi /2, pi/2] radians.

If x is NaN, a NaN is returned.

If x is 0, x is returned.

If x is ±Inf, ±x/2 is returned.

If x is subnormal, a range error may occur and x is returned.

Related Information

The atan2f, atan2l, or atan2 Subroutine and atanh, atanhf, or atanhl Subroutine.

math.h in AIX 5L Version 5.2 Files Reference.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]