xref: /titanic_41/usr/src/head/complex.h (revision 8bec192dcd36dd98fdfa7dc21be07e7bf222bea0)
1*5b2ba9d3SPiotr Jasiukajtis /*
2*5b2ba9d3SPiotr Jasiukajtis  * CDDL HEADER START
3*5b2ba9d3SPiotr Jasiukajtis  *
4*5b2ba9d3SPiotr Jasiukajtis  * The contents of this file are subject to the terms of the
5*5b2ba9d3SPiotr Jasiukajtis  * Common Development and Distribution License (the "License").
6*5b2ba9d3SPiotr Jasiukajtis  * You may not use this file except in compliance with the License.
7*5b2ba9d3SPiotr Jasiukajtis  *
8*5b2ba9d3SPiotr Jasiukajtis  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*5b2ba9d3SPiotr Jasiukajtis  * or http://www.opensolaris.org/os/licensing.
10*5b2ba9d3SPiotr Jasiukajtis  * See the License for the specific language governing permissions
11*5b2ba9d3SPiotr Jasiukajtis  * and limitations under the License.
12*5b2ba9d3SPiotr Jasiukajtis  *
13*5b2ba9d3SPiotr Jasiukajtis  * When distributing Covered Code, include this CDDL HEADER in each
14*5b2ba9d3SPiotr Jasiukajtis  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*5b2ba9d3SPiotr Jasiukajtis  * If applicable, add the following below this CDDL HEADER, with the
16*5b2ba9d3SPiotr Jasiukajtis  * fields enclosed by brackets "[]" replaced with your own identifying
17*5b2ba9d3SPiotr Jasiukajtis  * information: Portions Copyright [yyyy] [name of copyright owner]
18*5b2ba9d3SPiotr Jasiukajtis  *
19*5b2ba9d3SPiotr Jasiukajtis  * CDDL HEADER END
20*5b2ba9d3SPiotr Jasiukajtis  */
21*5b2ba9d3SPiotr Jasiukajtis /*
22*5b2ba9d3SPiotr Jasiukajtis  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
23*5b2ba9d3SPiotr Jasiukajtis  */
24*5b2ba9d3SPiotr Jasiukajtis /*
25*5b2ba9d3SPiotr Jasiukajtis  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
26*5b2ba9d3SPiotr Jasiukajtis  * Use is subject to license terms.
27*5b2ba9d3SPiotr Jasiukajtis  */
28*5b2ba9d3SPiotr Jasiukajtis 
29*5b2ba9d3SPiotr Jasiukajtis #ifndef _COMPLEX_H
30*5b2ba9d3SPiotr Jasiukajtis #define	_COMPLEX_H
31*5b2ba9d3SPiotr Jasiukajtis 
32*5b2ba9d3SPiotr Jasiukajtis #ifdef	__cplusplus
33*5b2ba9d3SPiotr Jasiukajtis extern "C" {
34*5b2ba9d3SPiotr Jasiukajtis #endif
35*5b2ba9d3SPiotr Jasiukajtis 
36*5b2ba9d3SPiotr Jasiukajtis /*
37*5b2ba9d3SPiotr Jasiukajtis  * Compilation environments for Solaris must provide the _Imaginary datatype
38*5b2ba9d3SPiotr Jasiukajtis  * and the compiler intrinsics _Complex_I and _Imaginary_I
39*5b2ba9d3SPiotr Jasiukajtis  */
40*5b2ba9d3SPiotr Jasiukajtis #if defined(__SUNPRO_C)
41*5b2ba9d3SPiotr Jasiukajtis #define	_Complex_I	_Complex_I
42*5b2ba9d3SPiotr Jasiukajtis #define	_Imaginary_I	_Imaginary_I
43*5b2ba9d3SPiotr Jasiukajtis #else
44*5b2ba9d3SPiotr Jasiukajtis #define	_Complex_I	1.0fi
45*5b2ba9d3SPiotr Jasiukajtis #define	_Imaginary_I	1.0fi
46*5b2ba9d3SPiotr Jasiukajtis #endif
47*5b2ba9d3SPiotr Jasiukajtis #define	complex		_Complex
48*5b2ba9d3SPiotr Jasiukajtis #define	imaginary	_Imaginary
49*5b2ba9d3SPiotr Jasiukajtis #undef	I
50*5b2ba9d3SPiotr Jasiukajtis #define	I		_Imaginary_I
51*5b2ba9d3SPiotr Jasiukajtis 
52*5b2ba9d3SPiotr Jasiukajtis extern float cabsf(float complex);
53*5b2ba9d3SPiotr Jasiukajtis extern float cargf(float complex);
54*5b2ba9d3SPiotr Jasiukajtis extern float cimagf(float complex);
55*5b2ba9d3SPiotr Jasiukajtis extern float crealf(float complex);
56*5b2ba9d3SPiotr Jasiukajtis extern float complex cacosf(float complex);
57*5b2ba9d3SPiotr Jasiukajtis extern float complex cacoshf(float complex);
58*5b2ba9d3SPiotr Jasiukajtis extern float complex casinf(float complex);
59*5b2ba9d3SPiotr Jasiukajtis extern float complex casinhf(float complex);
60*5b2ba9d3SPiotr Jasiukajtis extern float complex catanf(float complex);
61*5b2ba9d3SPiotr Jasiukajtis extern float complex catanhf(float complex);
62*5b2ba9d3SPiotr Jasiukajtis extern float complex ccosf(float complex);
63*5b2ba9d3SPiotr Jasiukajtis extern float complex ccoshf(float complex);
64*5b2ba9d3SPiotr Jasiukajtis extern float complex cexpf(float complex);
65*5b2ba9d3SPiotr Jasiukajtis extern float complex clogf(float complex);
66*5b2ba9d3SPiotr Jasiukajtis extern float complex conjf(float complex);
67*5b2ba9d3SPiotr Jasiukajtis extern float complex cpowf(float complex, float complex);
68*5b2ba9d3SPiotr Jasiukajtis extern float complex cprojf(float complex);
69*5b2ba9d3SPiotr Jasiukajtis extern float complex csinf(float complex);
70*5b2ba9d3SPiotr Jasiukajtis extern float complex csinhf(float complex);
71*5b2ba9d3SPiotr Jasiukajtis extern float complex csqrtf(float complex);
72*5b2ba9d3SPiotr Jasiukajtis extern float complex ctanf(float complex);
73*5b2ba9d3SPiotr Jasiukajtis extern float complex ctanhf(float complex);
74*5b2ba9d3SPiotr Jasiukajtis 
75*5b2ba9d3SPiotr Jasiukajtis extern double cabs(double complex);
76*5b2ba9d3SPiotr Jasiukajtis extern double carg(double complex);
77*5b2ba9d3SPiotr Jasiukajtis extern double cimag(double complex);
78*5b2ba9d3SPiotr Jasiukajtis extern double creal(double complex);
79*5b2ba9d3SPiotr Jasiukajtis extern double complex cacos(double complex);
80*5b2ba9d3SPiotr Jasiukajtis extern double complex cacosh(double complex);
81*5b2ba9d3SPiotr Jasiukajtis extern double complex casin(double complex);
82*5b2ba9d3SPiotr Jasiukajtis extern double complex casinh(double complex);
83*5b2ba9d3SPiotr Jasiukajtis extern double complex catan(double complex);
84*5b2ba9d3SPiotr Jasiukajtis extern double complex catanh(double complex);
85*5b2ba9d3SPiotr Jasiukajtis extern double complex ccos(double complex);
86*5b2ba9d3SPiotr Jasiukajtis extern double complex ccosh(double complex);
87*5b2ba9d3SPiotr Jasiukajtis extern double complex cexp(double complex);
88*5b2ba9d3SPiotr Jasiukajtis #if defined(__PRAGMA_REDEFINE_EXTNAME)
89*5b2ba9d3SPiotr Jasiukajtis #pragma redefine_extname clog __clog
90*5b2ba9d3SPiotr Jasiukajtis #else
91*5b2ba9d3SPiotr Jasiukajtis #undef	clog
92*5b2ba9d3SPiotr Jasiukajtis #define	clog	__clog
93*5b2ba9d3SPiotr Jasiukajtis #endif
94*5b2ba9d3SPiotr Jasiukajtis extern double complex clog(double complex);
95*5b2ba9d3SPiotr Jasiukajtis extern double complex conj(double complex);
96*5b2ba9d3SPiotr Jasiukajtis extern double complex cpow(double complex, double complex);
97*5b2ba9d3SPiotr Jasiukajtis extern double complex cproj(double complex);
98*5b2ba9d3SPiotr Jasiukajtis extern double complex csin(double complex);
99*5b2ba9d3SPiotr Jasiukajtis extern double complex csinh(double complex);
100*5b2ba9d3SPiotr Jasiukajtis extern double complex csqrt(double complex);
101*5b2ba9d3SPiotr Jasiukajtis extern double complex ctan(double complex);
102*5b2ba9d3SPiotr Jasiukajtis extern double complex ctanh(double complex);
103*5b2ba9d3SPiotr Jasiukajtis 
104*5b2ba9d3SPiotr Jasiukajtis extern long double cabsl(long double complex);
105*5b2ba9d3SPiotr Jasiukajtis extern long double cargl(long double complex);
106*5b2ba9d3SPiotr Jasiukajtis extern long double cimagl(long double complex);
107*5b2ba9d3SPiotr Jasiukajtis extern long double creall(long double complex);
108*5b2ba9d3SPiotr Jasiukajtis extern long double complex cacoshl(long double complex);
109*5b2ba9d3SPiotr Jasiukajtis extern long double complex cacosl(long double complex);
110*5b2ba9d3SPiotr Jasiukajtis extern long double complex casinhl(long double complex);
111*5b2ba9d3SPiotr Jasiukajtis extern long double complex casinl(long double complex);
112*5b2ba9d3SPiotr Jasiukajtis extern long double complex catanhl(long double complex);
113*5b2ba9d3SPiotr Jasiukajtis extern long double complex catanl(long double complex);
114*5b2ba9d3SPiotr Jasiukajtis extern long double complex ccoshl(long double complex);
115*5b2ba9d3SPiotr Jasiukajtis extern long double complex ccosl(long double complex);
116*5b2ba9d3SPiotr Jasiukajtis extern long double complex cexpl(long double complex);
117*5b2ba9d3SPiotr Jasiukajtis extern long double complex clogl(long double complex);
118*5b2ba9d3SPiotr Jasiukajtis extern long double complex conjl(long double complex);
119*5b2ba9d3SPiotr Jasiukajtis extern long double complex cpowl(long double complex, long double complex);
120*5b2ba9d3SPiotr Jasiukajtis extern long double complex cprojl(long double complex);
121*5b2ba9d3SPiotr Jasiukajtis extern long double complex csinhl(long double complex);
122*5b2ba9d3SPiotr Jasiukajtis extern long double complex csinl(long double complex);
123*5b2ba9d3SPiotr Jasiukajtis extern long double complex csqrtl(long double complex);
124*5b2ba9d3SPiotr Jasiukajtis extern long double complex ctanhl(long double complex);
125*5b2ba9d3SPiotr Jasiukajtis extern long double complex ctanl(long double complex);
126*5b2ba9d3SPiotr Jasiukajtis 
127*5b2ba9d3SPiotr Jasiukajtis #ifdef	__cplusplus
128*5b2ba9d3SPiotr Jasiukajtis }
129*5b2ba9d3SPiotr Jasiukajtis #endif
130*5b2ba9d3SPiotr Jasiukajtis #endif	/* _COMPLEX_H */
131