1.\" Copyright (c) 2004 Stefan Farfeleder 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.\" $FreeBSD$ 26.\" 27.Dd Aug 7, 2004 28.Dt CIMAG 3 29.Os 30.Sh NAME 31.Nm cimag , 32.Nm cimagf , 33.Nm cimagl , 34.Nm conj , 35.Nm conjf , 36.Nm conjl , 37.Nm creal , 38.Nm crealf , 39.Nm creall 40.Nd functions to manipulate complex numbers 41.Sh LIBRARY 42.Lb libm 43.Sh SYNOPSIS 44.In complex.h 45.Ft double 46.Fn cimag "double complex z" 47.Ft float 48.Fn cimagf "float complex z" 49.Ft long double 50.Fn cimagl "long double complex z" 51.Ft double complex 52.Fn conj "double complex z" 53.Ft float complex 54.Fn conjf "float complex z" 55.Ft long double complex 56.Fn conjl "long double complex z" 57.Ft double 58.Fn creal "double complex z" 59.Ft float 60.Fn crealf "float complex z" 61.Ft long double 62.Fn creall "long double complex z" 63.Sh DESCRIPTION 64Let 65.Sm off 66.Fa a + b * Em i 67.Sm on 68denote the complex number 69.Ar z . 70.Pp 71The 72.Fn cimag 73functions return the imaginary part 74.Fa b . 75.Pp 76The 77.Fn conj 78functions return the complex conjugate 79.Sm off 80.Fa a - b * Em i . 81.Sm on 82.Pp 83The 84.Fn creal 85functions return the real part 86.Fa a . 87.Sh STANDARDS 88The 89.Fn cimag , 90.Fn conj 91and 92.Fn creal 93functions conform to 94.St -isoC-99 . 95.Sh HISTORY 96The 97.Fn cimag , 98.Fn conj 99and 100.Fn creal 101functions first appeared in 102.Fx 5.3 . 103