1*05a0b428SJohn Marino.\" $OpenBSD: cproj.3,v 1.4 2013/11/03 18:28:27 martynas Exp $ 2*05a0b428SJohn Marino.\" 3*05a0b428SJohn Marino.\" Copyright (c) 2010 Todd C. Miller <Todd.Miller@courtesan.com> 4*05a0b428SJohn Marino.\" 5*05a0b428SJohn Marino.\" Permission to use, copy, modify, and distribute this software for any 6*05a0b428SJohn Marino.\" purpose with or without fee is hereby granted, provided that the above 7*05a0b428SJohn Marino.\" copyright notice and this permission notice appear in all copies. 8*05a0b428SJohn Marino.\" 9*05a0b428SJohn Marino.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10*05a0b428SJohn Marino.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11*05a0b428SJohn Marino.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12*05a0b428SJohn Marino.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13*05a0b428SJohn Marino.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14*05a0b428SJohn Marino.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15*05a0b428SJohn Marino.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16*05a0b428SJohn Marino.\" 17*05a0b428SJohn Marino.Dd $Mdocdate: November 3 2013 $ 18*05a0b428SJohn Marino.Dt CPROJ 3 19*05a0b428SJohn Marino.Os 20*05a0b428SJohn Marino.Sh NAME 21*05a0b428SJohn Marino.Nm cproj , 22*05a0b428SJohn Marino.Nm cprojf , 23*05a0b428SJohn Marino.Nm cprojl 24*05a0b428SJohn Marino.Nd compute projection onto Riemann sphere 25*05a0b428SJohn Marino.Sh SYNOPSIS 26*05a0b428SJohn Marino.In complex.h 27*05a0b428SJohn Marino.Ft double complex 28*05a0b428SJohn Marino.Fn cproj "double complex z" 29*05a0b428SJohn Marino.Ft float complex 30*05a0b428SJohn Marino.Fn cprojf "float complex z" 31*05a0b428SJohn Marino.Ft long double complex 32*05a0b428SJohn Marino.Fn cprojl "long double complex z" 33*05a0b428SJohn Marino.Sh DESCRIPTION 34*05a0b428SJohn MarinoThe 35*05a0b428SJohn Marino.Fn cproj , 36*05a0b428SJohn Marino.Fn cprojf 37*05a0b428SJohn Marinoand 38*05a0b428SJohn Marino.Fn cprojl 39*05a0b428SJohn Marinofunctions compute a projection of 40*05a0b428SJohn Marino.Fa z 41*05a0b428SJohn Marinoonto the Riemann sphere. 42*05a0b428SJohn Marino.Sh RETURN VALUES 43*05a0b428SJohn MarinoThe 44*05a0b428SJohn Marino.Fn cproj , 45*05a0b428SJohn Marino.Fn cprojf 46*05a0b428SJohn Marinoand 47*05a0b428SJohn Marino.Fn cprojl 48*05a0b428SJohn Marinofunctions return 49*05a0b428SJohn Marino.Fa z 50*05a0b428SJohn Marinofor all finite complex numbers. 51*05a0b428SJohn MarinoIf 52*05a0b428SJohn Marino.Fa z 53*05a0b428SJohn Marinohas an infinite part (even if the other part is \*(Na), 54*05a0b428SJohn Marinothey return the equivalent of: 55*05a0b428SJohn Marino.Bd -literal -offset indent 56*05a0b428SJohn MarinoINFINITY + I * copysign(0.0, cimag(z)) 57*05a0b428SJohn Marino.Ed 58*05a0b428SJohn Marino.Sh SEE ALSO 59*05a0b428SJohn Marino.Xr cimag 3 60*05a0b428SJohn Marino.Sh STANDARDS 61*05a0b428SJohn MarinoThe 62*05a0b428SJohn Marino.Fn cproj , 63*05a0b428SJohn Marino.Fn cprojf 64*05a0b428SJohn Marinoand 65*05a0b428SJohn Marino.Fn cprojl 66*05a0b428SJohn Marinofunctions conform to 67*05a0b428SJohn Marino.St -isoC-99 . 68