HPlogo HP-UX Reference > C

cproj(3M)

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

Technical documentation

 » Table of Contents

 » Index

NAME

cproj(), cprojf(), cprojl(), cprojw(), cprojq() — functions that project all infinities onto the one on the positive real axis

SYNOPSIS

#include <complex.h>

double complex cproj(double complex z);

float complex cprojf(float complex z);

long double complex cprojl(long double complex z);

extended complex cprojw(extended complex z);

quad complex cprojq(quad complex z);

DESCRIPTION

These functions are available only for Itanium-based systems.

cproj() returns its argument z, except if the argument is a complex infinity (even if it is a complex infinity which has one infinite part and one NaN part), then cproj() returns a positive infinity on the real axis, with imaginary part copysign(0.0,cimag( z )). It is intended as an aide for modeling the Riemann sphere.

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

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

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

cprojq() is equivalent to cprojl() on HP-UX systems.

These functions raise no exceptions.

USAGE

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

ERRORS

No errors are defined.

STANDARDS CONFORMANCE

cproj(), cprojf(), cprojl() : ISO/IEC C99 (including Annex G, ``IEC 60559-compatible complex arithmetic'')