xref: /freebsd/lib/msun/man/complex.3 (revision bc5356c5a838b353e3ea47b45cb050d1ee29af76)
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*bc5356c5SConrad Meyer.Dd June 6, 2018
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
66*bc5356c5SConrad Meyer.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
73*bc5356c5SConrad Meyercabs	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
80*bc5356c5SConrad Meyer.Ss Natural logarithm Function
810c0288a2SKonstantin Belousov.Cl
82*bc5356c5SConrad Meyerclog	natural logarithm
830c0288a2SKonstantin Belousov.El
8411725f21SMurray Stokely.\" Section 7.3.9 of ISO C99 standard
8511725f21SMurray Stokely.Ss Manipulation Functions
8611725f21SMurray Stokely.Cl
87*bc5356c5SConrad Meyercarg	compute the argument (i.e., phase angle)
8811725f21SMurray Stokelycimag	compute the imaginary part
8911725f21SMurray Stokelyconj	compute the complex conjugate
9011725f21SMurray Stokelycproj	compute projection onto Riemann sphere
9111725f21SMurray Stokelycreal	compute the real part
9211725f21SMurray Stokely.El
933daee1d6SDavid Schultz.\" Section 7.3.5-6 of ISO C99 standard
943daee1d6SDavid Schultz.Ss Trigonometric and Hyperbolic Functions
953daee1d6SDavid Schultz.Cl
96e4afa19cSDavid Schultzcacos	arc cosine
97e4afa19cSDavid Schultzcacosh	arc hyperbolic cosine
98e4afa19cSDavid Schultzcasin	arc sine
99e4afa19cSDavid Schultzcasinh	arc hyperbolic sine
100e4afa19cSDavid Schultzcatan	arc tangent
101e4afa19cSDavid Schultzcatanh	arc hyperbolic tangent
1023daee1d6SDavid Schultzccos	cosine
1033daee1d6SDavid Schultzccosh	hyperbolic cosine
1043daee1d6SDavid Schultzcsin	sine
1053daee1d6SDavid Schultzcsinh	hyperbolic sine
1063daee1d6SDavid Schultzctan	tangent
1073daee1d6SDavid Schultzctanh	hyperbolic tangent
1083daee1d6SDavid Schultz.El
10911725f21SMurray Stokely.Sh SEE ALSO
11011725f21SMurray Stokely.Xr fenv 3 ,
11111725f21SMurray Stokely.Xr ieee 3 ,
112c09eb466SJoel Dahl.Xr math 3 ,
11311725f21SMurray Stokely.Xr tgmath 3
11411725f21SMurray Stokely.Rs
11511725f21SMurray Stokely.%T "ISO/IEC 9899:TC3"
11611725f21SMurray Stokely.%U http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
11711725f21SMurray Stokely.Re
11811725f21SMurray Stokely.Sh STANDARDS
11911725f21SMurray StokelyThe
12011725f21SMurray Stokely.In complex.h
12111725f21SMurray Stokelyfunctions described here conform to
12211725f21SMurray Stokely.St -isoC-99 .
12311725f21SMurray Stokely.Sh BUGS
1240c0288a2SKonstantin BelousovThe power functions
12511725f21SMurray Stokely.Fn cpow
12611725f21SMurray Stokelyare not implemented.
127