125c28e8Piotr Jasiukajtis/*
225c28e8Piotr Jasiukajtis * CDDL HEADER START
325c28e8Piotr Jasiukajtis *
425c28e8Piotr Jasiukajtis * The contents of this file are subject to the terms of the
525c28e8Piotr Jasiukajtis * Common Development and Distribution License (the "License").
625c28e8Piotr Jasiukajtis * You may not use this file except in compliance with the License.
725c28e8Piotr Jasiukajtis *
825c28e8Piotr Jasiukajtis * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
925c28e8Piotr Jasiukajtis * or http://www.opensolaris.org/os/licensing.
1025c28e8Piotr Jasiukajtis * See the License for the specific language governing permissions
1125c28e8Piotr Jasiukajtis * and limitations under the License.
1225c28e8Piotr Jasiukajtis *
1325c28e8Piotr Jasiukajtis * When distributing Covered Code, include this CDDL HEADER in each
1425c28e8Piotr Jasiukajtis * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1525c28e8Piotr Jasiukajtis * If applicable, add the following below this CDDL HEADER, with the
1625c28e8Piotr Jasiukajtis * fields enclosed by brackets "[]" replaced with your own identifying
1725c28e8Piotr Jasiukajtis * information: Portions Copyright [yyyy] [name of copyright owner]
1825c28e8Piotr Jasiukajtis *
1925c28e8Piotr Jasiukajtis * CDDL HEADER END
2025c28e8Piotr Jasiukajtis */
2125c28e8Piotr Jasiukajtis/*
2225c28e8Piotr Jasiukajtis * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
2325c28e8Piotr Jasiukajtis */
2425c28e8Piotr Jasiukajtis/*
2525c28e8Piotr Jasiukajtis * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2625c28e8Piotr Jasiukajtis * Use is subject to license terms.
2725c28e8Piotr Jasiukajtis */
2825c28e8Piotr Jasiukajtis
2925c28e8Piotr Jasiukajtis#ifndef _COMPLEX_H
3025c28e8Piotr Jasiukajtis#define	_COMPLEX_H
3125c28e8Piotr Jasiukajtis
3225c28e8Piotr Jasiukajtis#ifdef	__cplusplus
3325c28e8Piotr Jasiukajtisextern "C" {
3425c28e8Piotr Jasiukajtis#endif
3525c28e8Piotr Jasiukajtis
3625c28e8Piotr Jasiukajtis/*
3725c28e8Piotr Jasiukajtis * Compilation environments for Solaris must provide the _Imaginary datatype
3825c28e8Piotr Jasiukajtis * and the compiler intrinsics _Complex_I and _Imaginary_I
3925c28e8Piotr Jasiukajtis */
4025c28e8Piotr Jasiukajtis#if defined(__SUNPRO_C)
4125c28e8Piotr Jasiukajtis#define	_Complex_I	_Complex_I
4225c28e8Piotr Jasiukajtis#define	_Imaginary_I	_Imaginary_I
4325c28e8Piotr Jasiukajtis#else
4425c28e8Piotr Jasiukajtis#define	_Complex_I	1.0fi
4525c28e8Piotr Jasiukajtis#define	_Imaginary_I	1.0fi
4625c28e8Piotr Jasiukajtis#endif
4725c28e8Piotr Jasiukajtis#define	complex		_Complex
4825c28e8Piotr Jasiukajtis#define	imaginary	_Imaginary
4925c28e8Piotr Jasiukajtis#undef	I
5025c28e8Piotr Jasiukajtis#define	I		_Imaginary_I
5125c28e8Piotr Jasiukajtis
5225c28e8Piotr Jasiukajtisextern float cabsf(float complex);
5325c28e8Piotr Jasiukajtisextern float cargf(float complex);
5425c28e8Piotr Jasiukajtisextern float cimagf(float complex);
5525c28e8Piotr Jasiukajtisextern float crealf(float complex);
5625c28e8Piotr Jasiukajtisextern float complex cacosf(float complex);
5725c28e8Piotr Jasiukajtisextern float complex cacoshf(float complex);
5825c28e8Piotr Jasiukajtisextern float complex casinf(float complex);
5925c28e8Piotr Jasiukajtisextern float complex casinhf(float complex);
6025c28e8Piotr Jasiukajtisextern float complex catanf(float complex);
6125c28e8Piotr Jasiukajtisextern float complex catanhf(float complex);
6225c28e8Piotr Jasiukajtisextern float complex ccosf(float complex);
6325c28e8Piotr Jasiukajtisextern float complex ccoshf(float complex);
6425c28e8Piotr Jasiukajtisextern float complex cexpf(float complex);
6525c28e8Piotr Jasiukajtisextern float complex clogf(float complex);
6625c28e8Piotr Jasiukajtisextern float complex conjf(float complex);
6725c28e8Piotr Jasiukajtisextern float complex cpowf(float complex, float complex);
6825c28e8Piotr Jasiukajtisextern float complex cprojf(float complex);
6925c28e8Piotr Jasiukajtisextern float complex csinf(float complex);
7025c28e8Piotr Jasiukajtisextern float complex csinhf(float complex);
7125c28e8Piotr Jasiukajtisextern float complex csqrtf(float complex);
7225c28e8Piotr Jasiukajtisextern float complex ctanf(float complex);
7325c28e8Piotr Jasiukajtisextern float complex ctanhf(float complex);
7425c28e8Piotr Jasiukajtis
7525c28e8Piotr Jasiukajtisextern double cabs(double complex);
7625c28e8Piotr Jasiukajtisextern double carg(double complex);
7725c28e8Piotr Jasiukajtisextern double cimag(double complex);
7825c28e8Piotr Jasiukajtisextern double creal(double complex);
7925c28e8Piotr Jasiukajtisextern double complex cacos(double complex);
8025c28e8Piotr Jasiukajtisextern double complex cacosh(double complex);
8125c28e8Piotr Jasiukajtisextern double complex casin(double complex);
8225c28e8Piotr Jasiukajtisextern double complex casinh(double complex);
8325c28e8Piotr Jasiukajtisextern double complex catan(double complex);
8425c28e8Piotr Jasiukajtisextern double complex catanh(double complex);
8525c28e8Piotr Jasiukajtisextern double complex ccos(double complex);
8625c28e8Piotr Jasiukajtisextern double complex ccosh(double complex);
8725c28e8Piotr Jasiukajtisextern double complex cexp(double complex);
8825c28e8Piotr Jasiukajtis#if defined(__PRAGMA_REDEFINE_EXTNAME)
8925c28e8Piotr Jasiukajtis#pragma redefine_extname clog __clog
9025c28e8Piotr Jasiukajtis#else
9125c28e8Piotr Jasiukajtis#undef	clog
9225c28e8Piotr Jasiukajtis#define	clog	__clog
9325c28e8Piotr Jasiukajtis#endif
9425c28e8Piotr Jasiukajtisextern double complex clog(double complex);
9525c28e8Piotr Jasiukajtisextern double complex conj(double complex);
9625c28e8Piotr Jasiukajtisextern double complex cpow(double complex, double complex);
9725c28e8Piotr Jasiukajtisextern double complex cproj(double complex);
9825c28e8Piotr Jasiukajtisextern double complex csin(double complex);
9925c28e8Piotr Jasiukajtisextern double complex csinh(double complex);
10025c28e8Piotr Jasiukajtisextern double complex csqrt(double complex);
10125c28e8Piotr Jasiukajtisextern double complex ctan(double complex);
10225c28e8Piotr Jasiukajtisextern double complex ctanh(double complex);
10325c28e8Piotr Jasiukajtis
10425c28e8Piotr Jasiukajtisextern long double cabsl(long double complex);
10525c28e8Piotr Jasiukajtisextern long double cargl(long double complex);
10625c28e8Piotr Jasiukajtisextern long double cimagl(long double complex);
10725c28e8Piotr Jasiukajtisextern long double creall(long double complex);
10825c28e8Piotr Jasiukajtisextern long double complex cacoshl(long double complex);
10925c28e8Piotr Jasiukajtisextern long double complex cacosl(long double complex);
11025c28e8Piotr Jasiukajtisextern long double complex casinhl(long double complex);
11125c28e8Piotr Jasiukajtisextern long double complex casinl(long double complex);
11225c28e8Piotr Jasiukajtisextern long double complex catanhl(long double complex);
11325c28e8Piotr Jasiukajtisextern long double complex catanl(long double complex);
11425c28e8Piotr Jasiukajtisextern long double complex ccoshl(long double complex);
11525c28e8Piotr Jasiukajtisextern long double complex ccosl(long double complex);
11625c28e8Piotr Jasiukajtisextern long double complex cexpl(long double complex);
11725c28e8Piotr Jasiukajtisextern long double complex clogl(long double complex);
11825c28e8Piotr Jasiukajtisextern long double complex conjl(long double complex);
11925c28e8Piotr Jasiukajtisextern long double complex cpowl(long double complex, long double complex);
12025c28e8Piotr Jasiukajtisextern long double complex cprojl(long double complex);
12125c28e8Piotr Jasiukajtisextern long double complex csinhl(long double complex);
12225c28e8Piotr Jasiukajtisextern long double complex csinl(long double complex);
12325c28e8Piotr Jasiukajtisextern long double complex csqrtl(long double complex);
12425c28e8Piotr Jasiukajtisextern long double complex ctanhl(long double complex);
12525c28e8Piotr Jasiukajtisextern long double complex ctanl(long double complex);
12625c28e8Piotr Jasiukajtis
12725c28e8Piotr Jasiukajtis#ifdef	__cplusplus
12825c28e8Piotr Jasiukajtis}
12925c28e8Piotr Jasiukajtis#endif
13025c28e8Piotr Jasiukajtis#endif	/* _COMPLEX_H */
131