Home | History | Annotate | Download | only in src

Lines Matching refs:complex

23 #include <complex>
36 // Complex division and square roots.
40 _STLP_DECLSPEC float _STLP_CALL abs(const complex<float>& __z)
43 _STLP_DECLSPEC double _STLP_CALL abs(const complex<double>& __z)
48 _STLP_DECLSPEC long double _STLP_CALL abs(const complex<long double>& __z)
55 _STLP_DECLSPEC float _STLP_CALL arg(const complex<float>& __z)
59 _STLP_DECLSPEC double _STLP_CALL arg(const complex<double>& __z)
64 _STLP_DECLSPEC long double _STLP_CALL arg(const complex<long double>& __z)
68 // Construct a complex number from polar representation
70 _STLP_DECLSPEC complex<float> _STLP_CALL polar(const float& __rho, const float& __phi)
71 { return complex<float>(__rho * ::cos(__phi), __rho * ::sin(__phi)); }
73 _STLP_DECLSPEC complex<double> _STLP_CALL polar(const double& __rho, const double& __phi)
74 { return complex<double>(__rho * ::cos(__phi), __rho * ::sin(__phi)); }
78 _STLP_DECLSPEC complex<long double> _STLP_CALL polar(const long double& __rho, const long double& __phi)
79 { return complex<long double>(__rho * ::cos(__phi), __rho * ::sin(__phi)); }
126 complex<float>::_div(const float& __z1_r, const float& __z1_i,
132 complex<float>::_div(const float& __z1_r,
139 complex<double>::_div(const double& __z1_r, const double& __z1_i,
145 complex<double>::_div(const double& __z1_r,
152 complex<long double>::_div(const long double& __z1_r, const long double& __z1_i,
158 complex<long double>::_div(const long double& __z1_r,
167 static complex<_Tp> sqrtT(const complex<_Tp>& z) {
171 complex<_Tp> result;
187 complex<float> _STLP_CALL
188 sqrt(const complex<float>& z) { return sqrtT(z); }
190 complex<double> _STLP_CALL
191 sqrt(const complex<double>& z) { return sqrtT(z); }
194 complex<long double> _STLP_CALL
195 sqrt(const complex<long double>& z) { return sqrtT(z); }
198 // exp, log, pow for complex<float>, complex<double>, and complex<long double>
202 static complex<_Tp> expT(const complex<_Tp>& z) {
204 return complex<_Tp>(expx * ::cos(z._M_im),
207 _STLP_DECLSPEC complex<float> _STLP_CALL exp(const complex<float>& z)
210 _STLP_DECLSPEC complex<double> _STLP_CALL exp(const complex<double>& z)
214 _STLP_DECLSPEC complex<long double> _STLP_CALL exp(const complex<long double>& z)
221 static complex<_Tp> log10T(const complex<_Tp>& z, const _Tp& ln10_inv) {
222 complex<_Tp> r;
229 _STLP_DECLSPEC complex<float> _STLP_CALL log10(const complex<float>& z)
235 _STLP_DECLSPEC complex<double> _STLP_CALL log10(const complex<double>& z)
242 _STLP_DECLSPEC complex<long double> _STLP_CALL log10(const complex<long double>& z)
252 static complex<_Tp> logT(const complex<_Tp>& z) {
253 complex<_Tp> r;
259 _STLP_DECLSPEC complex<float> _STLP_CALL log(const complex<float>& z)
262 _STLP_DECLSPEC complex<double> _STLP_CALL log(const complex<double>& z)
266 _STLP_DECLSPEC complex<long double> _STLP_CALL log(const complex<long double>& z)
273 static complex<_Tp> powT(const _Tp& a, const complex<_Tp>& b) {
278 return complex<_Tp>(x * ::cos(y), x * ::sin(y));
282 static complex<_Tp> powT(const complex<_Tp>& z_in, int n) {
283 complex<_Tp> z = z_in;
284 z = _STLP_PRIV __power(z, (n < 0 ? -n : n), multiplies< complex<_Tp> >());
292 static complex<_Tp> powT(const complex<_Tp>& a, const _Tp& b) {
298 return complex<_Tp>(x * ::cos(y), x * ::sin(y));
302 static complex<_Tp> powT(const complex<_Tp>& a, const complex<_Tp>& b) {
308 return complex<_Tp>(x * ::cos(y), x * ::sin(y));
311 _STLP_DECLSPEC complex<float> _STLP_CALL pow(const float& a, const complex<float>& b)
314 _STLP_DECLSPEC complex<float> _STLP_CALL pow(const complex<float>& z_in, int n)
317 _STLP_DECLSPEC complex<float> _STLP_CALL pow(const complex<float>& a, const float& b)
320 _STLP_DECLSPEC complex<float> _STLP_CALL pow(const complex<float>& a, const complex<float>& b)
323 _STLP_DECLSPEC complex<double> _STLP_CALL pow(const double& a, const complex<double>& b)
326 _STLP_DECLSPEC complex<double> _STLP_CALL pow(const complex<double>& z_in, int n)
329 _STLP_DECLSPEC complex<double> _STLP_CALL pow(const complex<double>& a, const double& b)
332 _STLP_DECLSPEC complex<double> _STLP_CALL pow(const complex<double>& a, const complex<double>& b)
336 _STLP_DECLSPEC complex<long double> _STLP_CALL pow(const long double& a,
337 const complex<long double>& b)
341 _STLP_DECLSPEC complex<long double> _STLP_CALL pow(const complex<long double>& z_in, int n)
344 _STLP_DECLSPEC complex<long double> _STLP_CALL pow(const complex<long double>& a,
348 _STLP_DECLSPEC complex<long double> _STLP_CALL pow(const complex<long double>& a,
349 const complex<long double>& b)