4 * This file is part of the Mingw32 package.
7 * Created by Danny Smith <dannysmith@users.sourceforge.net>
9 * THIS SOFTWARE IS NOT COPYRIGHTED
11 * This source code is offered for use in the public domain. You may
12 * use, modify or distribute it freely.
14 * This code is distributed in the hope that it will be useful but
15 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
16 * DISCLAIMED. This includes but is not limited to warranties of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 /* All the headers include this file. */
27 /* These macros are specified by C99 standard */
30 #define complex _Complex
33 #define _Complex_I (0.0F + 1.0iF)
35 /* GCC doesn't support _Imaginary type yet, so we don't
36 define _Imaginary_I */
44 double __MINGW_ATTRIB_CONST creal (double _Complex);
45 double __MINGW_ATTRIB_CONST cimag (double _Complex);
46 double __MINGW_ATTRIB_CONST carg (double _Complex);
47 double __MINGW_ATTRIB_CONST cabs (double _Complex);
48 double _Complex __MINGW_ATTRIB_CONST conj (double _Complex);
49 double _Complex cacos (double _Complex);
50 double _Complex casin (double _Complex);
51 double _Complex catan (double _Complex);
52 double _Complex ccos (double _Complex);
53 double _Complex csin (double _Complex);
54 double _Complex ctan (double _Complex);
55 double _Complex cacosh (double _Complex);
56 double _Complex casinh (double _Complex);
57 double _Complex catanh (double _Complex);
58 double _Complex ccosh (double _Complex);
59 double _Complex csinh (double _Complex);
60 double _Complex ctanh (double _Complex);
61 double _Complex cexp (double _Complex);
62 double _Complex clog (double _Complex);
63 double _Complex cpow (double _Complex, double _Complex);
64 double _Complex csqrt (double _Complex);
65 double _Complex __MINGW_ATTRIB_CONST cproj (double _Complex);
67 float __MINGW_ATTRIB_CONST crealf (float _Complex);
68 float __MINGW_ATTRIB_CONST cimagf (float _Complex);
69 float __MINGW_ATTRIB_CONST cargf (float _Complex);
70 float __MINGW_ATTRIB_CONST cabsf (float _Complex);
71 float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex);
72 float _Complex cacosf (float _Complex);
73 float _Complex casinf (float _Complex);
74 float _Complex catanf (float _Complex);
75 float _Complex ccosf (float _Complex);
76 float _Complex csinf (float _Complex);
77 float _Complex ctanf (float _Complex);
78 float _Complex cacoshf (float _Complex);
79 float _Complex casinhf (float _Complex);
80 float _Complex catanhf (float _Complex);
81 float _Complex ccoshf (float _Complex);
82 float _Complex csinhf (float _Complex);
83 float _Complex ctanhf (float _Complex);
84 float _Complex cexpf (float _Complex);
85 float _Complex clogf (float _Complex);
86 float _Complex cpowf (float _Complex, float _Complex);
87 float _Complex csqrtf (float _Complex);
88 float _Complex __MINGW_ATTRIB_CONST cprojf (float _Complex);
90 long double __MINGW_ATTRIB_CONST creall (long double _Complex);
91 long double __MINGW_ATTRIB_CONST cimagl (long double _Complex);
92 long double __MINGW_ATTRIB_CONST cargl (long double _Complex);
93 long double __MINGW_ATTRIB_CONST cabsl (long double _Complex);
94 long double _Complex __MINGW_ATTRIB_CONST conjl (long double _Complex);
95 long double _Complex cacosl (long double _Complex);
96 long double _Complex casinl (long double _Complex);
97 long double _Complex catanl (long double _Complex);
98 long double _Complex ccosl (long double _Complex);
99 long double _Complex csinl (long double _Complex);
100 long double _Complex ctanl (long double _Complex);
101 long double _Complex cacoshl (long double _Complex);
102 long double _Complex casinhl (long double _Complex);
103 long double _Complex catanhl (long double _Complex);
104 long double _Complex ccoshl (long double _Complex);
105 long double _Complex csinhl (long double _Complex);
106 long double _Complex ctanhl (long double _Complex);
107 long double _Complex cexpl (long double _Complex);
108 long double _Complex clogl (long double _Complex);
109 long double _Complex cpowl (long double _Complex, long double _Complex);
110 long double _Complex csqrtl (long double _Complex);
111 long double _Complex __MINGW_ATTRIB_CONST cprojl (long double _Complex);
116 __CRT_INLINE __LIBIMPL__(( FUNCTION = creal ))
117 double __MINGW_ATTRIB_CONST creal (double _Complex _Z)
122 __CRT_INLINE __LIBIMPL__(( FUNCTION = cimag ))
123 double __MINGW_ATTRIB_CONST cimag (double _Complex _Z)
128 __CRT_INLINE __LIBIMPL__(( FUNCTION = conj ))
129 double _Complex __MINGW_ATTRIB_CONST conj (double _Complex _Z)
131 return __extension__ ~_Z;
134 __CRT_INLINE __LIBIMPL__(( FUNCTION = carg ))
135 double __MINGW_ATTRIB_CONST carg (double _Complex _Z)
139 : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
145 __CRT_INLINE __LIBIMPL__(( FUNCTION = crealf ))
146 float __MINGW_ATTRIB_CONST crealf (float _Complex _Z)
151 __CRT_INLINE __LIBIMPL__(( FUNCTION = cimagf ))
152 float __MINGW_ATTRIB_CONST cimagf (float _Complex _Z)
157 __CRT_INLINE __LIBIMPL__(( FUNCTION = conjf ))
158 float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex _Z)
160 return __extension__ ~_Z;
163 __CRT_INLINE __LIBIMPL__(( FUNCTION = cargf ))
164 float __MINGW_ATTRIB_CONST cargf (float _Complex _Z)
168 : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
173 __CRT_INLINE __LIBIMPL__(( FUNCTION = creall ))
174 long double __MINGW_ATTRIB_CONST creall (long double _Complex _Z)
179 __CRT_INLINE __LIBIMPL__(( FUNCTION = cimagl ))
180 long double __MINGW_ATTRIB_CONST cimagl (long double _Complex _Z)
185 __CRT_INLINE __LIBIMPL__(( FUNCTION = conjl ))
186 long double _Complex __MINGW_ATTRIB_CONST conjl (long double _Complex _Z)
188 return __extension__ ~_Z;
191 __CRT_INLINE __LIBIMPL__(( FUNCTION = cargl ))
192 long double __MINGW_ATTRIB_CONST cargl (long double _Complex _Z)
196 : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
200 #endif /* __GNUC__ */
201 #endif /* RC_INVOKED */
205 #endif /* _COMPLEX_H */