HPlogo HP-UX Reference > C

cis(3M)

Itanium(R)-base System Only
HP-UX 11i Version 2: December 2007 Update
» 

Technical documentation

 » Table of Contents

 » Index

NAME

cis(), cisf(), cisl(), cisw(), cisq() — complex value with unit magnitude and given angle (specified in radians)

SYNOPSIS

#include <complex.h>

double complex cis(double x);

float complex cisf(float x);

long double complex cisl(long double x);

extended complex cisw(extended x);

quad complex cisq(quad x);

DESCRIPTION

These functions are available only for Itanium-based systems.

cis() returns the complex value whose real and imaginary parts are the cosine and sine of x, respectively. cis(x) is equivalent to cexp(ix).

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

cisl() is a long double complex version of cis(); it takes a long double argument and returns a long double complex result.

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

cisq() is equivalent to cisl() on HP-UX systems.

USAGE

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

RETURN VALUE

cis(-x) = conj(cis(x)).

cis(±0) returns 1±i0.

cis(+Inf) returns NaN+iNaN.

cis(NaN) returns NaN+iNaN.

ERRORS

No errors are defined.

STANDARDS CONFORMANCE

These functions are not specified by any standard.