[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 1

asin, asinl, acos, acosl, atan, atanl, atan2, or atan2l Subroutine

Purpose

Computes inverse trigonometric functions.

Libraries

IEEE Math Library (libm.a)
or System V Math Library (libmsaa.a)

Syntax

double asin (x)
double x;
long double asinl (x)
long double x;
double acos (x)
double x;
long double acosl (x)
long double x;
double atan (x)
double x;
long double atanl (x)
long double x;
double atan2 (y, x)
double y, x;
long double atan2l (x,y)
long double y, x;

Description

The asin and asinl subroutines return the principal value of the arc sine of x, in the range [-pi/2, pi/2].

The acos and acosl subroutines return the principal value of the arc cosine of x, in the range [0, pi].

The atan and atanl subroutines return the principal value of the arc tangent of x, in the range [-pi/2, pi/2].

The atan2 and atan2l subroutines return the principal value of the arc tangent of y/x, using the signs of both parameters to determine the quadrant of the return value. The return values are in the range [-pi, pi].

Parameters

x Specifies a double-precision floating-point value. For the asinl, acosl, atanl, and atan2l subroutines, specifies a long double-precision floating-point value.
y Specifies a double-precision floating-point value. For the asinl, acosl, atanl, and atan2l subroutines, specifies long double-precision floating-point value.

Error Codes

When using the libm.a (-lm) library:

asin, asinl, acos, acosl Return a NaNQ and set the errno global variable to EDOM if the absolute value of the parameter is greater than 1.

When using libmsaa.a (-lmsaa):

asin, acos, atan2, If the absolute value of the parameter of asin or acos is greater than 1, or if both parameters of atan2 are 0, then 0 is returned and errno is set to EDOM. In addition, a message indicating DOMAIN error is printed on the standard output.
asinl, acosl, atan2l Return a NaNQ and set the errno global variable to EDOM if the absolute value of the parameter is greater than 1.

These error-handling procedures may be changed with the matherr subroutine when using the libmsaa.a (-lmsaa) library.

Implementation Specifics

These subroutines are part of Base Operating System (BOS) Runtime.

Related Information

The asinh, acosh, or atanh subroutine, matherr subroutine.

Subroutines Overview in AIX General Programming Concepts: Writing and Debugging Programs.

128-Bit long double Floating-Point Format in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Contents | Glossary | Home | Search ]