complex.h revision 78172
178172Sru/*-
278172Sru * Copyright (c) 2001 The FreeBSD Project.
378172Sru * All rights reserved.
478172Sru *
578172Sru * Redistribution and use in source and binary forms, with or without
678172Sru * modification, are permitted provided that the following conditions
778172Sru * are met:
878172Sru * 1. Redistributions of source code must retain the above copyright
978172Sru *    notice, this list of conditions and the following disclaimer.
1078172Sru * 2. Redistributions in binary form must reproduce the above copyright
1178172Sru *    notice, this list of conditions and the following disclaimer in the
1278172Sru *    documentation and/or other materials provided with the distribution.
1378172Sru *
1478172Sru * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1578172Sru * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1678172Sru * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1778172Sru * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1878172Sru * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1978172Sru * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2078172Sru * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2178172Sru * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2278172Sru * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2378172Sru * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2478172Sru * SUCH DAMAGE.
2578172Sru *
2678172Sru * $FreeBSD: head/include/complex.h 78172 2001-06-13 15:16:30Z ru $
2778172Sru */
2878172Sru
2978172Sru#ifndef _COMPLEX_H
3078172Sru#define _COMPLEX_H
3178172Sru
3278172Sru#ifdef __GNUC__
3378172Sru#define _Complex	__complex__
3478172Sru#define _Complex_I	1.0fi
3578172Sru#endif
3678172Sru
3778172Sru#define complex		_Complex
3878172Sru#define I		_Complex_I
3978172Sru
4078172Sru#include <sys/cdefs.h>
4178172Sru
4278172Sru__BEGIN_DECLS
4378172Sru
4478172Srudouble	cabs __P((double complex));
4578172Srufloat	cabsf __P((float complex));
4678172Srudouble	cimag __P((double complex));
4778172Srufloat	cimagf __P((float complex));
4878172Srudouble	creal __P((double complex));
4978172Srufloat	crealf __P((float complex));
5078172Sru
5178172Sru__END_DECLS
5278172Sru
5378172Sru#ifdef __GNUC__
5478172Sru#define cimag(z)	(__imag__ (z))
5578172Sru#define cimagf(z)	(__imag__ (z))
5678172Sru#define creal(z)	(__real__ (z))
5778172Sru#define crealf(z)	(__real__ (z))
5878172Sru#endif
5978172Sru
6078172Sru#endif /* _COMPLEX_H */
61