Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > C


HP Integrity Server Only
HP-UX 11i Version 3: February 2007

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index


cacos(), cacosf(), cacosl(), cacosw(), cacosq() — complex arccosine functions


#include <complex.h>

double complex cacos(double complex z);

float complex cacosf(float complex z);

long double complex cacosl(long double complex z);

extended complex cacosw(extended complex z);

quad complex cacosq(quad complex z);


These functions are available only for Integrity servers.

cacos() returns the complex arccosine of z, in the range of a strip mathematically unbounded along the imaginary axis and in the interval [0,Pi] along the real axis.

Branch cuts are outside the interval [-1,+1] along the real axis.

cacosf() is a float complex version of cacos(); it takes a float complex argument and returns a float complex result.

cacosl() is a long double complex cacos(); it takes a long double complex argument and returns a long double complex result.

cacosw() is an extended complex version of cacos(); it takes an extended complex argument and returns an extended complex result.

cacosq() is equivalent to cacosl() on HP-UX systems.


To use these functions, compile with the default -Ae option. To use cacosw() or cacosq(), compile with the -fpwidetypes option. Make sure your program includes <complex.h>, and link in the math library by specifying -lm on the compiler or linker command line.


cacos(conj(z)) = conj(cacos(z))

cacos(±0+i0) returns Pi/2-i0.

cacos(±0+iNaN) returns Pi/2+iNaN.

cacos(x+iInf) returns Pi/2-iInf, for finite x.

cacos(x+iNaN) returns NaN+iNaN and optionally raises the invalid floating-point exception, for nonzero finite x.

cacos(-Inf+iy) returns Pi-iInf, for positive-signed finite y.

cacos(+Inf+iy) returns +0-iInf, for positive-signed finite y.

cacos(-Inf+iInf) returns 3Pi/4-iInf.

cacos(+Inf+iInf) returns Pi/4-iInf.

cacos(±Inf+iNaN) returns NaN±iInf (where the sign of the imaginary part of the result is unspecified).

cacos(NaN+iy) returns NaN+iNaN and optionally raises the invalid floating-point exception, for finite y.

cacos(NaN+iInf) returns NaN-iInf.

cacos(NaN+iNaN) returns NaN+iNaN.


No errors are defined.


cacos(), cacosf(), cacosl() : ISO/IEC C99 (including Annex G, ``IEC 60559-compatible complex arithmetic'')

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.