1*bf198cc6Smillert.\" $OpenBSD: cproj.3,v 1.6 2019/01/25 00:19:25 millert Exp $ 249cbc55eSmillert.\" 3*bf198cc6Smillert.\" Copyright (c) 2010 Todd C. Miller <millert@openbsd.org> 449cbc55eSmillert.\" 549cbc55eSmillert.\" Permission to use, copy, modify, and distribute this software for any 649cbc55eSmillert.\" purpose with or without fee is hereby granted, provided that the above 749cbc55eSmillert.\" copyright notice and this permission notice appear in all copies. 849cbc55eSmillert.\" 949cbc55eSmillert.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1049cbc55eSmillert.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1149cbc55eSmillert.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1249cbc55eSmillert.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1349cbc55eSmillert.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1449cbc55eSmillert.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1549cbc55eSmillert.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1649cbc55eSmillert.\" 17*bf198cc6Smillert.Dd $Mdocdate: January 25 2019 $ 1849cbc55eSmillert.Dt CPROJ 3 1949cbc55eSmillert.Os 2049cbc55eSmillert.Sh NAME 2149cbc55eSmillert.Nm cproj , 222bfdbafeSmartynas.Nm cprojf , 232bfdbafeSmartynas.Nm cprojl 2449cbc55eSmillert.Nd compute projection onto Riemann sphere 2549cbc55eSmillert.Sh SYNOPSIS 2686f9d4cdStedu.In complex.h 2749cbc55eSmillert.Ft double complex 2849cbc55eSmillert.Fn cproj "double complex z" 2949cbc55eSmillert.Ft float complex 3049cbc55eSmillert.Fn cprojf "float complex z" 312bfdbafeSmartynas.Ft long double complex 322bfdbafeSmartynas.Fn cprojl "long double complex z" 3349cbc55eSmillert.Sh DESCRIPTION 3449cbc55eSmillertThe 352bfdbafeSmartynas.Fn cproj , 3649cbc55eSmillert.Fn cprojf 372bfdbafeSmartynasand 382bfdbafeSmartynas.Fn cprojl 3949cbc55eSmillertfunctions compute a projection of 4049cbc55eSmillert.Fa z 4149cbc55eSmillertonto the Riemann sphere. 4249cbc55eSmillert.Sh RETURN VALUES 4349cbc55eSmillertThe 442bfdbafeSmartynas.Fn cproj , 4549cbc55eSmillert.Fn cprojf 462bfdbafeSmartynasand 472bfdbafeSmartynas.Fn cprojl 4849cbc55eSmillertfunctions return 4949cbc55eSmillert.Fa z 5049cbc55eSmillertfor all finite complex numbers. 5149cbc55eSmillertIf 5249cbc55eSmillert.Fa z 539f1be2b6Stbhas an infinite part (even if the other part is NaN), 5449cbc55eSmillertthey return the equivalent of: 5549cbc55eSmillert.Bd -literal -offset indent 5649cbc55eSmillertINFINITY + I * copysign(0.0, cimag(z)) 5749cbc55eSmillert.Ed 5849cbc55eSmillert.Sh SEE ALSO 5949cbc55eSmillert.Xr cimag 3 6049cbc55eSmillert.Sh STANDARDS 6149cbc55eSmillertThe 622bfdbafeSmartynas.Fn cproj , 6349cbc55eSmillert.Fn cprojf 642bfdbafeSmartynasand 652bfdbafeSmartynas.Fn cprojl 6649cbc55eSmillertfunctions conform to 6749cbc55eSmillert.St -isoC-99 . 68