complex.h revision 181375
1218887Sdim/*-
2218887Sdim * Copyright (c) 2001-2008 The FreeBSD Project.
3353358Sdim * All rights reserved.
4353358Sdim *
5353358Sdim * Redistribution and use in source and binary forms, with or without
6218887Sdim * modification, are permitted provided that the following conditions
7218887Sdim * are met:
8218887Sdim * 1. Redistributions of source code must retain the above copyright
9309124Sdim *    notice, this list of conditions and the following disclaimer.
10309124Sdim * 2. Redistributions in binary form must reproduce the above copyright
11309124Sdim *    notice, this list of conditions and the following disclaimer in the
12309124Sdim *    documentation and/or other materials provided with the distribution.
13309124Sdim *
14309124Sdim * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15309124Sdim * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16309124Sdim * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17218887Sdim * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18309124Sdim * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19309124Sdim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20309124Sdim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21309124Sdim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22309124Sdim * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23309124Sdim * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24309124Sdim * SUCH DAMAGE.
25309124Sdim *
26309124Sdim * $FreeBSD: head/include/complex.h 181375 2008-08-07 14:40:52Z das $
27309124Sdim */
28218887Sdim
29218887Sdim#ifndef _COMPLEX_H
30344779Sdim#define	_COMPLEX_H
31360784Sdim
32249423Sdim#ifdef __GNUC__
33249423Sdim#if __STDC_VERSION__ < 199901
34249423Sdim#define	_Complex	__complex__
35249423Sdim#endif
36249423Sdim#define	_Complex_I	1.0fi
37314564Sdim#endif
38249423Sdim
39309124Sdim#define	complex		_Complex
40221345Sdim#define	I		_Complex_I
41218887Sdim
42309124Sdim#include <sys/cdefs.h>
43309124Sdim
44309124Sdim__BEGIN_DECLS
45309124Sdim
46309124Sdimdouble		cabs(double complex);
47218887Sdimfloat		cabsf(float complex);
48218887Sdimlong double	cabsl(long double complex);
49218887Sdimdouble		carg(double complex);
50218887Sdimfloat		cargf(float complex);
51218887Sdimlong double	cargl(long double complex);
52309124Sdimdouble		cimag(double complex) __pure2;
53309124Sdimfloat		cimagf(float complex) __pure2;
54309124Sdimlong double	cimagl(long double complex) __pure2;
55309124Sdimdouble complex	conj(double complex) __pure2;
56309124Sdimfloat complex	conjf(float complex) __pure2;
57309124Sdimlong double complex
58218887Sdim		conjl(long double complex) __pure2;
59309124Sdimdouble		creal(double complex) __pure2;
60309124Sdimfloat		crealf(float complex) __pure2;
61218887Sdimlong double	creall(long double complex) __pure2;
62309124Sdimdouble complex	csqrt(double complex);
63309124Sdimfloat complex	csqrtf(float complex);
64309124Sdimlong double complex
65218887Sdim		csqrtl(long double complex);
66309124Sdim
67309124Sdim__END_DECLS
68309124Sdim
69309124Sdim#endif /* _COMPLEX_H */
70309124Sdim