HPlogo HP-UX Reference > C

cexp2(3M)

HP Integrity Server Only
HP-UX 11i Version 2: December 2007 Update
» 

Technical documentation

 » Table of Contents

 » Index

NAME

cexp2(), cexp2f(), cexp2l(), cexp2w(), cexp2q() — complex base-2 exponential functions

SYNOPSIS

#include <complex.h>

double complex cexp2(double complex z);

float complex cexp2f(float complex z);

long double complex cexp2l(long double complex z);

extended complex cexp2w(extended complex z);

quad complex cexp2q(quad complex z);

DESCRIPTION

cexp2() returns the complex base-2 exponential of z.

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

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

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

cexp2q() is equivalent to cexp2l() on HP-UX systems.

USAGE

To use these functions, compile with the default -Ae option. To use cexp2w() or cexp2q(), 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

cexp2(conj(z)) = conj(cexp2(z)).

cexp2(±0+i0) returns 1+i0.

cexp2(x+iInf) returns NaN+iNaN and raises the invalid floating-point exception, for finite x.

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

cexp2(+Inf+i0) returns +Inf+i0.

cexp2(-Inf+iy) returns +0(cos(log(2)y) +isin(log(2) y)), for finite y.

cexp2(+Inf+iy) returns +Inf(cos(log(2)y) +isin(log(2) y)), for finite nonzero y.

cexp2(-Inf+iInf) returns ±0±i0 (where the signs of the real and imaginary parts of the result are unspecified).

cexp2(+Inf+iInf) returns ±Inf+iNaN and raises the invalid floating-point exception (where the sign of the real part of the result is unspecified).

cexp2(-Inf+iNaN) returns ±0±i0 (where the signs of the real and imaginary parts of the result are unspecified).

cexp2(+Inf+iNaN) returns ±Inf+iNaN (where the sign of the real part of the result is unspecified).

cexp2(NaN+i0) returns NaN+i0.

cexp2(NaN+iy) returns NaN+iNaN and optionally raises the invalid floating-point exception, for all non-zero numbers y.

cexp2(NaN+iNaN) returns NaN+iNaN.

ERRORS

No errors are defined.

STANDARDS CONFORMANCE

These functions are not specified by any standard.