complex.h revision 219379
11592Srgrimes/*-
21592Srgrimes * Copyright (c) 2001-2008 The FreeBSD Project.
31592Srgrimes * All rights reserved.
41592Srgrimes *
51592Srgrimes * Redistribution and use in source and binary forms, with or without
61592Srgrimes * modification, are permitted provided that the following conditions
71592Srgrimes * are met:
81592Srgrimes * 1. Redistributions of source code must retain the above copyright
91592Srgrimes *    notice, this list of conditions and the following disclaimer.
101592Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111592Srgrimes *    notice, this list of conditions and the following disclaimer in the
121592Srgrimes *    documentation and/or other materials provided with the distribution.
131592Srgrimes *
141592Srgrimes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
151592Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
161592Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
171592Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
181592Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
191592Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
201592Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
211592Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
221592Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
231592Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
241592Srgrimes * SUCH DAMAGE.
251592Srgrimes *
261592Srgrimes * $FreeBSD: head/include/complex.h 219379 2011-03-07 16:05:45Z das $
271592Srgrimes */
281592Srgrimes
291592Srgrimes#ifndef _COMPLEX_H
301592Srgrimes#define	_COMPLEX_H
311592Srgrimes
321592Srgrimes#ifdef __GNUC__
331592Srgrimes#if __STDC_VERSION__ < 199901
3417478Smarkm#define	_Complex	__complex__
351592Srgrimes#endif
361592Srgrimes#define	_Complex_I	1.0fi
371592Srgrimes#endif
381592Srgrimes
391592Srgrimes#define	complex		_Complex
4017478Smarkm#define	I		_Complex_I
411592Srgrimes
4231329Scharnier#include <sys/cdefs.h>
4317478Smarkm
441592Srgrimes__BEGIN_DECLS
4531329Scharnier
461592Srgrimesdouble		cabs(double complex);
471592Srgrimesfloat		cabsf(float complex);
48137859Syarlong double	cabsl(long double complex);
49137859Syardouble		carg(double complex);
50137859Syarfloat		cargf(float complex);
511592Srgrimeslong double	cargl(long double complex);
521592Srgrimesdouble complex	cexp(double complex);
531592Srgrimesfloat complex	cexpf(float complex);
541592Srgrimesdouble		cimag(double complex) __pure2;
551592Srgrimesfloat		cimagf(float complex) __pure2;
5666907Swollmanlong double	cimagl(long double complex) __pure2;
571592Srgrimesdouble complex	conj(double complex) __pure2;
5866907Swollmanfloat complex	conjf(float complex) __pure2;
5966907Swollmanlong double complex
601592Srgrimes		conjl(long double complex) __pure2;
611592Srgrimesfloat complex	cprojf(float complex) __pure2;
621592Srgrimesdouble complex	cproj(double complex) __pure2;
631592Srgrimeslong double complex
641592Srgrimes		cprojl(long double complex) __pure2;
658240Swollmandouble		creal(double complex) __pure2;
661592Srgrimesfloat		crealf(float complex) __pure2;
671592Srgrimeslong double	creall(long double complex) __pure2;
681592Srgrimesdouble complex	csqrt(double complex);
691592Srgrimesfloat complex	csqrtf(float complex);
701592Srgrimeslong double complex
711592Srgrimes		csqrtl(long double complex);
721592Srgrimes
731592Srgrimes__END_DECLS
741592Srgrimes
751592Srgrimes#endif /* _COMPLEX_H */
761592Srgrimes