xref: /freebsd/lib/msun/man/complex.3 (revision 3daee1d6c3783e32a226d145f85a887007f5754b)
111725f21SMurray Stokely.\" Copyright (c) 2011 Murray Stokely <murray@FreeBSD.org>
211725f21SMurray Stokely.\" All rights reserved.
311725f21SMurray Stokely.\"
411725f21SMurray Stokely.\" Redistribution and use in source and binary forms, with or without
511725f21SMurray Stokely.\" modification, are permitted provided that the following conditions
611725f21SMurray Stokely.\" are met:
711725f21SMurray Stokely.\" 1. Redistributions of source code must retain the above copyright
811725f21SMurray Stokely.\"    notice, this list of conditions and the following disclaimer.
911725f21SMurray Stokely.\" 2. Redistributions in binary form must reproduce the above copyright
1011725f21SMurray Stokely.\"    notice, this list of conditions and the following disclaimer in the
1111725f21SMurray Stokely.\"    documentation and/or other materials provided with the distribution.
1211725f21SMurray Stokely.\"
1311725f21SMurray Stokely.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
1411725f21SMurray Stokely.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1511725f21SMurray Stokely.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1611725f21SMurray Stokely.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
1711725f21SMurray Stokely.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1811725f21SMurray Stokely.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1911725f21SMurray Stokely.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2011725f21SMurray Stokely.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2111725f21SMurray Stokely.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2211725f21SMurray Stokely.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2311725f21SMurray Stokely.\" SUCH DAMAGE.
2411725f21SMurray Stokely.\"
2511725f21SMurray Stokely.\" $FreeBSD$
2611725f21SMurray Stokely.\"
27*3daee1d6SDavid Schultz.Dd October 17, 2011
2811725f21SMurray Stokely.Dt COMPLEX 3
2911725f21SMurray Stokely.Os
3011725f21SMurray Stokely.Sh NAME
3111725f21SMurray Stokely.Nm complex
3211725f21SMurray Stokely.Nd "complex arithmetic"
3311725f21SMurray Stokely.Sh LIBRARY
3411725f21SMurray Stokely.Lb libm
3511725f21SMurray Stokely.Sh SYNOPSIS
3611725f21SMurray Stokely.In complex.h
3711725f21SMurray Stokely.Sh DESCRIPTION
3811725f21SMurray StokelyThese functions support complex arithmetic in the C math library.
3911725f21SMurray Stokely.Sh "LIST OF FUNCTIONS"
4011725f21SMurray StokelyEach of the following
4111725f21SMurray Stokely.Vt "double complex"
4211725f21SMurray Stokelyfunctions has a
4311725f21SMurray Stokely.Vt "float complex"
4411725f21SMurray Stokelycounterpart with an
4511725f21SMurray Stokely.Ql f
4611725f21SMurray Stokelyappended to the name and a
4711725f21SMurray Stokely.Vt "long double complex"
4811725f21SMurray Stokelycounterpart with an
4911725f21SMurray Stokely.Ql l
5011725f21SMurray Stokelyappended.
5111725f21SMurray StokelyAs an example, the
5211725f21SMurray Stokely.Vt "float complex"
5311725f21SMurray Stokelyand
5411725f21SMurray Stokely.Vt "long double complex"
5511725f21SMurray Stokelycounterparts of
5611725f21SMurray Stokely.Ft double
5711725f21SMurray Stokely.Fn cabs "double complex z"
5811725f21SMurray Stokelyare
5911725f21SMurray Stokely.Ft float
6011725f21SMurray Stokely.Fn cabsf "float complex z"
6111725f21SMurray Stokelyand
6211725f21SMurray Stokely.Ft "long double"
6311725f21SMurray Stokely.Fn cabsl "long double complex z" ,
6411725f21SMurray Stokelyrespectively.
6511725f21SMurray Stokely.de Cl
6611725f21SMurray Stokely.Bl -column "csqrt" "complex absolute value (i.e. norm, modulus, magnitude)"
6711725f21SMurray Stokely.Em "Name	Description"
6811725f21SMurray Stokely..
6911725f21SMurray Stokely.\" Section 7.3.5 - 7.3.7 of ISO C99 standard unimplemented, see BUGS
7011725f21SMurray Stokely.\" Section 7.3.8 of ISO C99 standard
7111725f21SMurray Stokely.Ss Absolute-value Functions
7211725f21SMurray Stokely.Cl
7311725f21SMurray Stokelycabs	complex absolute value (i.e. norm, modulus, magnitude)
7411725f21SMurray Stokelycsqrt	complex square root
7511725f21SMurray Stokely.El
76d1327156SDavid Schultz.Ss Exponential Function
77d1327156SDavid Schultz.Cl
78d1327156SDavid Schultzcexp	exponential base e
79d1327156SDavid Schultz.El
8011725f21SMurray Stokely.\" Section 7.3.9 of ISO C99 standard
8111725f21SMurray Stokely.Ss Manipulation Functions
8211725f21SMurray Stokely.Cl
8311725f21SMurray Stokelycarg	compute the argument (i.e. phase angle)
8411725f21SMurray Stokelycimag	compute the imaginary part
8511725f21SMurray Stokelyconj	compute the complex conjugate
8611725f21SMurray Stokelycproj	compute projection onto Riemann sphere
8711725f21SMurray Stokelycreal	compute the real part
8811725f21SMurray Stokely.El
89*3daee1d6SDavid Schultz.\" Section 7.3.5-6 of ISO C99 standard
90*3daee1d6SDavid Schultz.Ss Trigonometric and Hyperbolic Functions
91*3daee1d6SDavid Schultz.Cl
92*3daee1d6SDavid Schultzccos	cosine
93*3daee1d6SDavid Schultzccosh	hyperbolic cosine
94*3daee1d6SDavid Schultzcsin	sine
95*3daee1d6SDavid Schultzcsinh	hyperbolic sine
96*3daee1d6SDavid Schultzctan	tangent
97*3daee1d6SDavid Schultzctanh	hyperbolic tangent
98*3daee1d6SDavid Schultz.El
9911725f21SMurray Stokely.Sh SEE ALSO
10011725f21SMurray Stokely.Xr math 3 ,
10111725f21SMurray Stokely.Xr fenv 3 ,
10211725f21SMurray Stokely.Xr ieee 3 ,
10311725f21SMurray Stokely.Xr tgmath 3
10411725f21SMurray Stokely.Rs
10511725f21SMurray Stokely.%T "ISO/IEC 9899:TC3"
10611725f21SMurray Stokely.%U http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
10711725f21SMurray Stokely.Re
10811725f21SMurray Stokely.Sh STANDARDS
10911725f21SMurray StokelyThe
11011725f21SMurray Stokely.In complex.h
11111725f21SMurray Stokelyfunctions described here conform to
11211725f21SMurray Stokely.St -isoC-99 .
11311725f21SMurray Stokely.Sh BUGS
114*3daee1d6SDavid SchultzThe inverse trigonmetric and hyperbolic functions
11511725f21SMurray Stokely.Fn cacos ,
11611725f21SMurray Stokely.Fn cacosh ,
117d1327156SDavid Schultz.Fn casin ,
11811725f21SMurray Stokely.Fn casinh ,
119d1327156SDavid Schultz.Fn catan ,
12011725f21SMurray Stokelyand
121*3daee1d6SDavid Schultz.Fn catanh
12211725f21SMurray Stokelyare not implemented.
12311725f21SMurray Stokely.Pp
124d1327156SDavid SchultzThe logarithmic functions
12511725f21SMurray Stokely.Fn clog
12611725f21SMurray Stokelyare not implemented.
12711725f21SMurray Stokely.Pp
12811725f21SMurray StokelyThe power functions
12911725f21SMurray Stokely.Fn cpow
13011725f21SMurray Stokelyare not implemented.
131