cproj.3   [plain text]


.\" Copyright (c) 2006 Apple Computer
.\"
.Dd October 10, 2006
.Dt CPROJ 3
.Os BSD 4
.Sh NAME
.Nm cproj
.Nd projection onto the Riemann sphere
.Sh SYNOPSIS
.Fd #include <complex.h>
.Ft double complex
.Fn cproj "double complex z"
.Ft long double complex
.Fn cprojl "long double complex z"
.Ft float complex
.Fn cprojf "float complex z"
.Sh DESCRIPTION
.Fn cproj "z"
computes the projection of a complex floating-point number
.Fa z
onto the Riemann sphere: for any finite
.Fa z ,
.Fn cproj "z"
= z, but all complex infinities (including infinities with one NaN part)
project to positive infinity on the real axis.
.Pp
Specifically, if
.Fa z
= x + iy has an infinite part (one of x or y is infinity), then
.Fn cproj "z"
is equivalent to INFINITY + I*copysign(0.0,cimag(z)).
.Sh SEE ALSO
.Xr complex 3
.Sh STANDARDS
The
.Fn cproj
function conforms to ISO/IEC 9899:1999(E).