ReactOS  0.4.11-dev-721-g95bc44e
_complex.h File Reference
#include <stl/_cmath.h>
#include <stl/_iosfwd.h>
#include <stl/_complex.c>
Include dependency graph for _complex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  complex< _Tp >
 
struct  complex< float >
 
struct  complex< double >
 
struct  complex< long double >
 

Functions

template<class _Tp >
complex< _Tp > _STLP_CALL operator+ (const complex< _Tp > &__z)
 
template<class _Tp >
complex< _Tp > _STLP_CALL operator- (const complex< _Tp > &__z)
 
template<class _Tp >
complex< _Tp > _STLP_CALL operator+ (const _Tp &__x, const complex< _Tp > &__z)
 
template<class _Tp >
complex< _Tp > _STLP_CALL operator+ (const complex< _Tp > &__z, const _Tp &__x)
 
template<class _Tp >
complex< _Tp > _STLP_CALL operator- (const _Tp &__x, const complex< _Tp > &__z)
 
template<class _Tp >
complex< _Tp > _STLP_CALL operator- (const complex< _Tp > &__z, const _Tp &__x)
 
template<class _Tp >
complex< _Tp > _STLP_CALL operator* (const _Tp &__x, const complex< _Tp > &__z)
 
template<class _Tp >
complex< _Tp > _STLP_CALL operator* (const complex< _Tp > &__z, const _Tp &__x)
 
template<class _Tp >
complex< _Tp > _STLP_CALL operator/ (const _Tp &__x, const complex< _Tp > &__z)
 
template<class _Tp >
complex< _Tp > _STLP_CALL operator/ (const complex< _Tp > &__z, const _Tp &__x)
 
template<class _Tp >
complex< _Tp > _STLP_CALL operator+ (const complex< _Tp > &__z1, const complex< _Tp > &__z2)
 
template<class _Tp >
complex< _Tp > _STLP_CALL operator- (const complex< _Tp > &__z1, const complex< _Tp > &__z2)
 
template<class _Tp >
complex< _Tp > _STLP_CALL operator* (const complex< _Tp > &__z1, const complex< _Tp > &__z2)
 
template<class _Tp >
complex< _Tp > _STLP_CALL operator/ (const complex< _Tp > &__z1, const complex< _Tp > &__z2)
 
template<class _Tp >
bool _STLP_CALL operator== (const complex< _Tp > &__z1, const complex< _Tp > &__z2)
 
template<class _Tp >
bool _STLP_CALL operator== (const complex< _Tp > &__z, const _Tp &__x)
 
template<class _Tp >
bool _STLP_CALL operator== (const _Tp &__x, const complex< _Tp > &__z)
 
template<class _Tp >
bool _STLP_CALL operator!= (const complex< _Tp > &__z1, const complex< _Tp > &__z2)
 
template<class _Tp >
bool _STLP_CALL operator!= (const complex< _Tp > &__z, const _Tp &__x)
 
template<class _Tp >
bool _STLP_CALL operator!= (const _Tp &__x, const complex< _Tp > &__z)
 
template<class _Tp >
_Tp _STLP_CALL real (const complex< _Tp > &__z)
 
template<class _Tp >
_Tp _STLP_CALL imag (const complex< _Tp > &__z)
 
template<class _Tp >
_Tp _STLP_CALL abs (const complex< _Tp > &__z)
 
template<class _Tp >
_Tp _STLP_CALL arg (const complex< _Tp > &__z)
 
template<class _Tp >
_Tp _STLP_CALL norm (const complex< _Tp > &__z)
 
template<class _Tp >
complex< _Tp > _STLP_CALL conj (const complex< _Tp > &__z)
 
template<class _Tp >
complex< _Tp > _STLP_CALL polar (const _Tp &__rho)
 
template<class _Tp >
complex< _Tp > _STLP_CALL polar (const _Tp &__rho, const _Tp &__phi)
 
_STLP_TEMPLATE_NULL
_STLP_DECLSPEC float
_STLP_CALL 
abs (const complex< float > &)
 
_STLP_TEMPLATE_NULL
_STLP_DECLSPEC double
_STLP_CALL 
abs (const complex< double > &)
 
_STLP_TEMPLATE_NULL
_STLP_DECLSPEC float
_STLP_CALL 
arg (const complex< float > &)
 
_STLP_TEMPLATE_NULL
_STLP_DECLSPEC double
_STLP_CALL 
arg (const complex< double > &)
 
_STLP_TEMPLATE_NULL
_STLP_DECLSPEC complex< float >
_STLP_CALL 
polar (const float &__rho, const float &__phi)
 
_STLP_TEMPLATE_NULL
_STLP_DECLSPEC complex< double >
_STLP_CALL 
polar (const double &__rho, const double &__phi)
 
_STLP_TEMPLATE_NULL
_STLP_DECLSPEC long double
_STLP_CALL 
arg (const complex< long double > &)
 
_STLP_TEMPLATE_NULL
_STLP_DECLSPEC long double
_STLP_CALL 
abs (const complex< long double > &)
 
_STLP_TEMPLATE_NULL
_STLP_DECLSPEC complex< long
double > _STLP_CALL 
polar (const long double &, const long double &)
 
template<class _Tp , class _CharT , class _Traits >
_STLP_END_NAMESPACE
_STLP_BEGIN_NAMESPACE
basic_ostream< _CharT, _Traits >
&_STLP_CALL 
operator<< (basic_ostream< _CharT, _Traits > &__os, const complex< _Tp > &__z)
 
template<class _Tp , class _CharT , class _Traits >
basic_istream< _CharT, _Traits >
&_STLP_CALL 
operator>> (basic_istream< _CharT, _Traits > &__is, complex< _Tp > &__z)
 
_STLP_OPERATOR_TEMPLATE
_STLP_DECLSPEC basic_istream
< char, char_traits< char >
> &_STLP_CALL 
operator>> (basic_istream< char, char_traits< char > > &__is, complex< float > &__z)
 
_STLP_OPERATOR_TEMPLATE
_STLP_DECLSPEC basic_istream
< char, char_traits< char >
> &_STLP_CALL 
operator>> (basic_istream< char, char_traits< char > > &__is, complex< double > &__z)
 
_STLP_OPERATOR_TEMPLATE
_STLP_DECLSPEC basic_ostream
< char, char_traits< char >
> &_STLP_CALL 
operator<< (basic_ostream< char, char_traits< char > > &__is, const complex< float > &__z)
 
_STLP_OPERATOR_TEMPLATE
_STLP_DECLSPEC basic_ostream
< char, char_traits< char >
> &_STLP_CALL 
operator<< (basic_ostream< char, char_traits< char > > &__is, const complex< double > &__z)
 
_STLP_OPERATOR_TEMPLATE
_STLP_DECLSPEC basic_istream
< char, char_traits< char >
> &_STLP_CALL 
operator>> (basic_istream< char, char_traits< char > > &__is, complex< long double > &__z)
 
_STLP_OPERATOR_TEMPLATE
_STLP_DECLSPEC basic_ostream
< char, char_traits< char >
> &_STLP_CALL 
operator<< (basic_ostream< char, char_traits< char > > &__is, const complex< long double > &__z)
 
_STLP_DECLSPEC complex< float >
_STLP_CALL 
sqrt (const complex< float > &)
 
_STLP_DECLSPEC complex< float >
_STLP_CALL 
exp (const complex< float > &)
 
_STLP_DECLSPEC complex< float >
_STLP_CALL 
log (const complex< float > &)
 
_STLP_DECLSPEC complex< float >
_STLP_CALL 
log10 (const complex< float > &)
 
_STLP_DECLSPEC complex< float >
_STLP_CALL 
pow (const complex< float > &, int)
 
_STLP_DECLSPEC complex< float >
_STLP_CALL 
pow (const complex< float > &, const float &)
 
_STLP_DECLSPEC complex< float >
_STLP_CALL 
pow (const float &, const complex< float > &)
 
_STLP_DECLSPEC complex< float >
_STLP_CALL 
pow (const complex< float > &, const complex< float > &)
 
_STLP_DECLSPEC complex< float >
_STLP_CALL 
sin (const complex< float > &)
 
_STLP_DECLSPEC complex< float >
_STLP_CALL 
cos (const complex< float > &)
 
_STLP_DECLSPEC complex< float >
_STLP_CALL 
tan (const complex< float > &)
 
_STLP_DECLSPEC complex< float >
_STLP_CALL 
sinh (const complex< float > &)
 
_STLP_DECLSPEC complex< float >
_STLP_CALL 
cosh (const complex< float > &)
 
_STLP_DECLSPEC complex< float >
_STLP_CALL 
tanh (const complex< float > &)
 
_STLP_DECLSPEC complex< double >
_STLP_CALL 
sqrt (const complex< double > &)
 
_STLP_DECLSPEC complex< double >
_STLP_CALL 
exp (const complex< double > &)
 
_STLP_DECLSPEC complex< double >
_STLP_CALL 
log (const complex< double > &)
 
_STLP_DECLSPEC complex< double >
_STLP_CALL 
log10 (const complex< double > &)
 
_STLP_DECLSPEC complex< double >
_STLP_CALL 
pow (const complex< double > &, int)
 
_STLP_DECLSPEC complex< double >
_STLP_CALL 
pow (const complex< double > &, const double &)
 
_STLP_DECLSPEC complex< double >
_STLP_CALL 
pow (const double &, const complex< double > &)
 
_STLP_DECLSPEC complex< double >
_STLP_CALL 
pow (const complex< double > &, const complex< double > &)
 
_STLP_DECLSPEC complex< double >
_STLP_CALL 
sin (const complex< double > &)
 
_STLP_DECLSPEC complex< double >
_STLP_CALL 
cos (const complex< double > &)
 
_STLP_DECLSPEC complex< double >
_STLP_CALL 
tan (const complex< double > &)
 
_STLP_DECLSPEC complex< double >
_STLP_CALL 
sinh (const complex< double > &)
 
_STLP_DECLSPEC complex< double >
_STLP_CALL 
cosh (const complex< double > &)
 
_STLP_DECLSPEC complex< double >
_STLP_CALL 
tanh (const complex< double > &)
 
_STLP_DECLSPEC complex< long
double > _STLP_CALL 
sqrt (const complex< long double > &)
 
_STLP_DECLSPEC complex< long
double > _STLP_CALL 
exp (const complex< long double > &)
 
_STLP_DECLSPEC complex< long
double > _STLP_CALL 
log (const complex< long double > &)
 
_STLP_DECLSPEC complex< long
double > _STLP_CALL 
log10 (const complex< long double > &)
 
_STLP_DECLSPEC complex< long
double > _STLP_CALL 
pow (const complex< long double > &, int)
 
_STLP_DECLSPEC complex< long
double > _STLP_CALL 
pow (const complex< long double > &, const long double &)
 
_STLP_DECLSPEC complex< long
double > _STLP_CALL 
pow (const long double &, const complex< long double > &)
 
_STLP_DECLSPEC complex< long
double > _STLP_CALL 
pow (const complex< long double > &, const complex< long double > &)
 
_STLP_DECLSPEC complex< long
double > _STLP_CALL 
sin (const complex< long double > &)
 
_STLP_DECLSPEC complex< long
double > _STLP_CALL 
cos (const complex< long double > &)
 
_STLP_DECLSPEC complex< long
double > _STLP_CALL 
tan (const complex< long double > &)
 
_STLP_DECLSPEC complex< long
double > _STLP_CALL 
sinh (const complex< long double > &)
 
_STLP_DECLSPEC complex< long
double > _STLP_CALL 
cosh (const complex< long double > &)
 
_STLP_DECLSPEC complex< long
double > _STLP_CALL 
tanh (const complex< long double > &)
 

Function Documentation

template<class _Tp >
_Tp _STLP_CALL abs ( const complex< _Tp > &  __z)

Definition at line 769 of file _complex.h.

770 { return _Tp(abs(complex<double>(double(__z.real()), double(__z.imag())))); }
_Tp _STLP_CALL abs(const complex< _Tp > &__z)
Definition: _complex.h:769
value_type imag() const
Definition: _complex.h:70
value_type real() const
Definition: _complex.h:69

Definition at line 40 of file complex.cpp.

41 { return ::hypot(__z._M_re, __z._M_im); }
_Check_return_ __CRT_INLINE double hypot(_In_ double x, _In_ double y)
Definition: math.h:223

Definition at line 43 of file complex.cpp.

44 { return ::hypot(__z._M_re, __z._M_im); }
_Check_return_ __CRT_INLINE double hypot(_In_ double x, _In_ double y)
Definition: math.h:223

Definition at line 48 of file complex.cpp.

49 { return ::hypot(__z._M_re, __z._M_im); }
_Check_return_ __CRT_INLINE double hypot(_In_ double x, _In_ double y)
Definition: math.h:223
template<class _Tp >
_Tp _STLP_CALL arg ( const complex< _Tp > &  __z)

Definition at line 773 of file _complex.h.

774 { return _Tp(arg(complex<double>(double(__z.real()), double(__z.imag())))); }
_Tp _STLP_CALL arg(const complex< _Tp > &__z)
Definition: _complex.h:773
value_type imag() const
Definition: _complex.h:70
value_type real() const
Definition: _complex.h:69

Definition at line 55 of file complex.cpp.

56 { return ::atan2(__z._M_im, __z._M_re); }
valarray< _Tp > atan2(const valarray< _Tp > &__x, const valarray< _Tp > &__y)
Definition: _valarray.h:928

Definition at line 59 of file complex.cpp.

60 { return ::atan2(__z._M_im, __z._M_re); }
valarray< _Tp > atan2(const valarray< _Tp > &__x, const valarray< _Tp > &__y)
Definition: _valarray.h:928

Definition at line 64 of file complex.cpp.

65 { return ::atan2(__z._M_im, __z._M_re); }
valarray< _Tp > atan2(const valarray< _Tp > &__x, const valarray< _Tp > &__y)
Definition: _valarray.h:928
template<class _Tp >
complex<_Tp> _STLP_CALL conj ( const complex< _Tp > &  __z)
inline

Definition at line 745 of file _complex.h.

746 { return complex<_Tp>(__z._M_re, -__z._M_im); }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171

Definition at line 95 of file complex_trig.cpp.

96 { return cosT(z); }
static complex< _Tp > cosT(const complex< _Tp > &z)
GLdouble GLdouble z
Definition: glext.h:5874

Definition at line 99 of file complex_trig.cpp.

100 { return cosT(z); }
static complex< _Tp > cosT(const complex< _Tp > &z)
GLdouble GLdouble z
Definition: glext.h:5874
_STLP_DECLSPEC complex<float> _STLP_CALL cosh ( const complex< float > &  )

Definition at line 156 of file complex_trig.cpp.

Referenced by _CIcosh(), coshf(), coshT(), cosT(), CMathTest::import_checks(), rpn_cosh(), sinhT(), sinT(), tanhT(), tanT(), and ValarrayTest::transcendentals().

157 { return coshT(z); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > coshT(const complex< _Tp > &z)

Definition at line 159 of file complex_trig.cpp.

160 { return coshT(z); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > coshT(const complex< _Tp > &z)

Definition at line 163 of file complex_trig.cpp.

164 { return coshT(z); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > coshT(const complex< _Tp > &z)
_STLP_DECLSPEC complex<float> _STLP_CALL exp ( const complex< float > &  )

Definition at line 207 of file complex.cpp.

Referenced by expT(), and powT().

208 { return expT(z); }
static complex< _Tp > expT(const complex< _Tp > &z)
Definition: complex.cpp:202
GLdouble GLdouble z
Definition: glext.h:5874

Definition at line 210 of file complex.cpp.

211 { return expT(z); }
static complex< _Tp > expT(const complex< _Tp > &z)
Definition: complex.cpp:202
GLdouble GLdouble z
Definition: glext.h:5874

Definition at line 214 of file complex.cpp.

215 { return expT(z); }
static complex< _Tp > expT(const complex< _Tp > &z)
Definition: complex.cpp:202
GLdouble GLdouble z
Definition: glext.h:5874
template<class _Tp >
_Tp _STLP_CALL imag ( const complex< _Tp > &  __z)
inline

Definition at line 731 of file _complex.h.

732 { return __z._M_im; }
value_type _M_im
Definition: _complex.h:171
_STLP_DECLSPEC complex<float> _STLP_CALL log ( const complex< float > &  )

Definition at line 253 of file complex.cpp.

Referenced by logT(), and powT().

254 { return logT(z); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > logT(const complex< _Tp > &z)
Definition: complex.cpp:246

Definition at line 256 of file complex.cpp.

257 { return logT(z); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > logT(const complex< _Tp > &z)
Definition: complex.cpp:246

Definition at line 260 of file complex.cpp.

261 { return logT(z); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > logT(const complex< _Tp > &z)
Definition: complex.cpp:246
_STLP_DECLSPEC complex<float> _STLP_CALL log10 ( const complex< float > &  )

Definition at line 230 of file complex.cpp.

Referenced by _CIlog10(), DSOUND_Calc3DBuffer(), GraphCtrl_InvalidateCtrl(), CMathTest::import_checks(), log10f(), log10T(), logic_dbl2int(), MCIQTZ_mciSetAudio(), MSVCRT_I10_OUTPUT(), number_to_fixed(), number_to_str(), Number_toPrecision(), prepare_rpn_result_2(), rpn_log(), ValarrayTest::transcendentals(), and TRIO_ARGS2().

231 { return log10T(z, LN10_INVF); }
static const float LN10_INVF
Definition: complex.cpp:229
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > log10T(const complex< _Tp > &z, const _Tp &ln10_inv)
Definition: complex.cpp:221

Definition at line 234 of file complex.cpp.

235 { return log10T(z, LN10_INV); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > log10T(const complex< _Tp > &z, const _Tp &ln10_inv)
Definition: complex.cpp:221
static const double LN10_INV
Definition: complex.cpp:233

Definition at line 239 of file complex.cpp.

240 { return log10T(z, LN10_INVL); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > log10T(const complex< _Tp > &z, const _Tp &ln10_inv)
Definition: complex.cpp:221
static const long double LN10_INVL
Definition: complex.cpp:238
template<class _Tp >
bool _STLP_CALL operator!= ( const complex< _Tp > &  __z1,
const complex< _Tp > &  __z2 
)
inline

Definition at line 712 of file _complex.h.

713 { return __z1._M_re != __z2._M_re || __z1._M_im != __z2._M_im; }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
bool _STLP_CALL operator!= ( const complex< _Tp > &  __z,
const _Tp &  __x 
)
inline

Definition at line 718 of file _complex.h.

719 { return __z._M_re != __x || __z._M_im != 0; }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
bool _STLP_CALL operator!= ( const _Tp &  __x,
const complex< _Tp > &  __z 
)
inline

Definition at line 722 of file _complex.h.

723 { return __x != __z._M_re || 0 != __z._M_im; }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
complex<_Tp> _STLP_CALL operator* ( const _Tp &  __x,
const complex< _Tp > &  __z 
)
inline

Definition at line 644 of file _complex.h.

645 { return complex<_Tp>(__x * __z._M_re, __x * __z._M_im); }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
complex<_Tp> _STLP_CALL operator* ( const complex< _Tp > &  __z,
const _Tp &  __x 
)
inline

Definition at line 648 of file _complex.h.

649 { return complex<_Tp>(__z._M_re * __x, __z._M_im * __x); }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
complex<_Tp> _STLP_CALL operator* ( const complex< _Tp > &  __z1,
const complex< _Tp > &  __z2 
)
inline

Definition at line 678 of file _complex.h.

678  {
679  return complex<_Tp>(__z1._M_re * __z2._M_re - __z1._M_im * __z2._M_im,
680  __z1._M_re * __z2._M_im + __z1._M_im * __z2._M_re);
681 }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
complex<_Tp> _STLP_CALL operator+ ( const complex< _Tp > &  __z)
inline

Definition at line 618 of file _complex.h.

619 { return __z; }
template<class _Tp >
complex<_Tp> _STLP_CALL operator+ ( const _Tp &  __x,
const complex< _Tp > &  __z 
)
inline

Definition at line 628 of file _complex.h.

629 { return complex<_Tp>(__x + __z._M_re, __z._M_im); }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
complex<_Tp> _STLP_CALL operator+ ( const complex< _Tp > &  __z,
const _Tp &  __x 
)
inline

Definition at line 632 of file _complex.h.

633 { return complex<_Tp>(__z._M_re + __x, __z._M_im); }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
complex<_Tp> _STLP_CALL operator+ ( const complex< _Tp > &  __z1,
const complex< _Tp > &  __z2 
)
inline

Definition at line 668 of file _complex.h.

669 { return complex<_Tp>(__z1._M_re + __z2._M_re, __z1._M_im + __z2._M_im); }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
complex<_Tp> _STLP_CALL operator- ( const complex< _Tp > &  __z)
inline

Definition at line 622 of file _complex.h.

Referenced by __money_do_put().

623 { return complex<_Tp>(-__z._M_re, -__z._M_im); }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
complex<_Tp> _STLP_CALL operator- ( const _Tp &  __x,
const complex< _Tp > &  __z 
)
inline

Definition at line 636 of file _complex.h.

637 { return complex<_Tp>(__x - __z._M_re, -__z._M_im); }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
complex<_Tp> _STLP_CALL operator- ( const complex< _Tp > &  __z,
const _Tp &  __x 
)
inline

Definition at line 640 of file _complex.h.

641 { return complex<_Tp>(__z._M_re - __x, __z._M_im); }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
complex<_Tp> _STLP_CALL operator- ( const complex< _Tp > &  __z1,
const complex< _Tp > &  __z2 
)
inline

Definition at line 673 of file _complex.h.

674 { return complex<_Tp>(__z1._M_re - __z2._M_re, __z1._M_im - __z2._M_im); }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
complex<_Tp> _STLP_CALL operator/ ( const _Tp &  __x,
const complex< _Tp > &  __z 
)
inline

Definition at line 652 of file _complex.h.

652  {
653  complex<_Tp> __result;
654  complex<_Tp>::_div(__x,
655  __z._M_re, __z._M_im,
656  __result._M_re, __result._M_im);
657  return __result;
658 }
static void _STLP_CALL _div(const value_type &__z1_r, const value_type &__z1_i, const value_type &__z2_r, const value_type &__z2_i, value_type &__res_r, value_type &__res_i)
Definition: _complex.c:44
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
complex<_Tp> _STLP_CALL operator/ ( const complex< _Tp > &  __z,
const _Tp &  __x 
)
inline

Definition at line 661 of file _complex.h.

662 { return complex<_Tp>(__z._M_re / __x, __z._M_im / __x); }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
complex<_Tp> _STLP_CALL operator/ ( const complex< _Tp > &  __z1,
const complex< _Tp > &  __z2 
)
inline

Definition at line 685 of file _complex.h.

685  {
686  complex<_Tp> __result;
687  complex<_Tp>::_div(__z1._M_re, __z1._M_im,
688  __z2._M_re, __z2._M_im,
689  __result._M_re, __result._M_im);
690  return __result;
691 }
static void _STLP_CALL _div(const value_type &__z1_r, const value_type &__z1_i, const value_type &__z2_r, const value_type &__z2_i, value_type &__res_r, value_type &__res_i)
Definition: _complex.c:44
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp , class _CharT , class _Traits >
_STLP_END_NAMESPACE _STLP_BEGIN_NAMESPACE basic_ostream<_CharT, _Traits>& _STLP_CALL operator<< ( basic_ostream< _CharT, _Traits > &  __os,
const complex< _Tp > &  __z 
)

Definition at line 92 of file _complex.c.

92  {
94  __tmp.flags(__os.flags());
95  __tmp.imbue(__os.getloc());
96  __tmp.precision(__os.precision());
97  __tmp << '(' << __z.real() << ',' << __z.imag() << ')';
98  return __os << __tmp.str();
99 }
streamsize precision() const
Definition: _ios_base.h:127
fmtflags flags() const
Definition: _ios_base.h:107
_String str() const
Definition: _sstream.h:184
locale imbue(const locale &)
Definition: _ios.c:69
locale getloc() const
Definition: _ios_base.h:143
value_type imag() const
Definition: _complex.h:70
value_type real() const
Definition: _complex.h:69

Definition at line 30 of file complex_io.cpp.

31 { return __os << '(' << (double)__z.real() << ',' << (double)__z.imag() << ')'; }
value_type real() const
Definition: _complex.h:195
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
Definition: string.c:80
value_type imag() const
Definition: _complex.h:196

Definition at line 35 of file complex_io.cpp.

36 { return __os << '(' << __z.real() << ',' << __z.imag() << ')'; }
value_type imag() const
Definition: _complex.h:335
value_type real() const
Definition: _complex.h:334

Definition at line 41 of file complex_io.cpp.

42 { return __os << '(' << __z.real() << ',' << __z.imag() << ')'; }
value_type imag() const
Definition: _complex.h:473
value_type real() const
Definition: _complex.h:472
template<class _Tp >
bool _STLP_CALL operator== ( const complex< _Tp > &  __z1,
const complex< _Tp > &  __z2 
)
inline

Definition at line 696 of file _complex.h.

697 { return __z1._M_re == __z2._M_re && __z1._M_im == __z2._M_im; }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
bool _STLP_CALL operator== ( const complex< _Tp > &  __z,
const _Tp &  __x 
)
inline

Definition at line 700 of file _complex.h.

701 { return __z._M_re == __x && __z._M_im == 0; }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp >
bool _STLP_CALL operator== ( const _Tp &  __x,
const complex< _Tp > &  __z 
)
inline

Definition at line 704 of file _complex.h.

705 { return __x == __z._M_re && 0 == __z._M_im; }
value_type _M_re
Definition: _complex.h:170
value_type _M_im
Definition: _complex.h:171
template<class _Tp , class _CharT , class _Traits >
basic_istream<_CharT, _Traits>& _STLP_CALL operator>> ( basic_istream< _CharT, _Traits > &  __is,
complex< _Tp > &  __z 
)

Definition at line 107 of file _complex.c.

107  {
108  _Tp __re = 0;
109  _Tp __im = 0;
110 
111  const ctype<_CharT>& __c_type = *__is._M_ctype_facet();
112 
113  const char __punct[4] = "(,)";
114  _CharT __wpunct[3];
115  __c_type.widen(__punct, __punct + 3, __wpunct);
116 
117  _CharT __c;
118 
119  __is >> __c;
120  if (_Traits::eq(__c, __wpunct[0])) { // Left paren
121  __is >> __re >> __c;
122  if (_Traits::eq(__c, __wpunct[1])) // Comma
123  __is >> __im >> __c;
124  if (!_Traits::eq(__c, __wpunct[2])) // Right paren
125  __is.setstate(ios_base::failbit);
126  }
127  else {
128  __is.putback(__c);
129  __is >> __re;
130  }
131 
132  if (__is)
133  __z = complex<_Tp>(__re, __im);
134  return __is;
135 }
_Self & putback(char_type __c)
const ctype< char_type > * _M_ctype_facet() const
Definition: _ios.h:121
#define eq(received, expected, label, type)
Definition: locale.c:144
#define __c
Definition: schilyio.h:209
Definition: _ctype.h:58
void setstate(iostate __state)
Definition: _ios.h:95

Definition at line 48 of file complex_io.cpp.

48  {
49  float __re = 0;
50  float __im = 0;
51 
52  char __c;
53 
54  __is >> __c;
55  if (__c == '(') {
56  __is >> __re >> __c;
57  if (__c == ',')
58  __is >> __im >> __c;
59  if (__c != ')')
60  __is.setstate(ios_base::failbit);
61  }
62  else {
63  __is.putback(__c);
64  __is >> __re;
65  }
66 
67  if (__is)
68  __z = complex<float>(__re, __im);
69  return __is;
70 }
_Self & putback(char_type __c)
#define __c
Definition: schilyio.h:209
void setstate(iostate __state)
Definition: _ios.h:95

Definition at line 74 of file complex_io.cpp.

74  {
75  double __re = 0;
76  double __im = 0;
77 
78  char __c;
79 
80  __is >> __c;
81  if (__c == '(') {
82  __is >> __re >> __c;
83  if (__c == ',')
84  __is >> __im >> __c;
85  if (__c != ')')
86  __is.setstate(ios_base::failbit);
87  }
88  else {
89  __is.putback(__c);
90  __is >> __re;
91  }
92 
93  if (__is)
94  __z = complex<double>(__re, __im);
95  return __is;
96 }
_Self & putback(char_type __c)
#define __c
Definition: schilyio.h:209
void setstate(iostate __state)
Definition: _ios.h:95

Definition at line 101 of file complex_io.cpp.

101  {
102  long double __re = 0;
103  long double __im = 0;
104 
105  char __c;
106 
107  __is >> __c;
108  if (__c == '(') {
109  __is >> __re >> __c;
110  if (__c == ',')
111  __is >> __im >> __c;
112  if (__c != ')')
113  __is.setstate(ios_base::failbit);
114  }
115  else {
116  __is.putback(__c);
117  __is >> __re;
118  }
119 
120  if (__is)
121  __z = complex<long double>(__re, __im);
122  return __is;
123 }
_Self & putback(char_type __c)
#define __c
Definition: schilyio.h:209
void setstate(iostate __state)
Definition: _ios.h:95
template<class _Tp >
complex<_Tp> _STLP_CALL polar ( const _Tp &  __rho)

Definition at line 749 of file _complex.h.

Referenced by polar().

750 { return complex<_Tp>(__rho, 0); }
template<class _Tp >
complex< _Tp > _STLP_CALL polar ( const _Tp &  __rho,
const _Tp &  __phi 
)

Definition at line 777 of file _complex.h.

777  {
778  complex<double> __tmp = polar(double(__rho), double(__phi));
779  return complex<_Tp>(_Tp(__tmp.real()), _Tp(__tmp.imag()));
780 }
value_type imag() const
Definition: _complex.h:335
complex< _Tp > _STLP_CALL polar(const _Tp &__rho)
Definition: _complex.h:749
value_type real() const
Definition: _complex.h:334
_STLP_TEMPLATE_NULL _STLP_DECLSPEC complex<float> _STLP_CALL polar ( const float &  __rho,
const float &  __phi 
)

Definition at line 70 of file complex.cpp.

71 { return complex<float>(__rho * ::cos(__phi), __rho * ::sin(__phi)); }
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)

Definition at line 73 of file complex.cpp.

74 { return complex<double>(__rho * ::cos(__phi), __rho * ::sin(__phi)); }
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)

Definition at line 78 of file complex.cpp.

79 { return complex<long double>(__rho * ::cos(__phi), __rho * ::sin(__phi)); }
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
_STLP_DECLSPEC complex<float> _STLP_CALL pow ( const complex< float > &  ,
int   
)

Definition at line 308 of file complex.cpp.

309 { return powT(z_in, n); }
GLuint n
Definition: s_context.h:57
static complex< _Tp > powT(const _Tp &a, const complex< _Tp > &b)
Definition: complex.cpp:267
_STLP_DECLSPEC complex<float> _STLP_CALL pow ( const complex< float > &  ,
const float &   
)

Definition at line 311 of file complex.cpp.

312 { return powT(a, b); }
static complex< _Tp > powT(const _Tp &a, const complex< _Tp > &b)
Definition: complex.cpp:267
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
_STLP_DECLSPEC complex<float> _STLP_CALL pow ( const float &  ,
const complex< float > &   
)

Definition at line 305 of file complex.cpp.

306 { return powT(a, b); }
static complex< _Tp > powT(const _Tp &a, const complex< _Tp > &b)
Definition: complex.cpp:267
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
_STLP_DECLSPEC complex<float> _STLP_CALL pow ( const complex< float > &  ,
const complex< float > &   
)

Definition at line 314 of file complex.cpp.

315 { return powT(a, b); }
static complex< _Tp > powT(const _Tp &a, const complex< _Tp > &b)
Definition: complex.cpp:267
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

Definition at line 320 of file complex.cpp.

321 { return powT(z_in, n); }
GLuint n
Definition: s_context.h:57
static complex< _Tp > powT(const _Tp &a, const complex< _Tp > &b)
Definition: complex.cpp:267

Definition at line 323 of file complex.cpp.

324 { return powT(a, b); }
static complex< _Tp > powT(const _Tp &a, const complex< _Tp > &b)
Definition: complex.cpp:267
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

Definition at line 317 of file complex.cpp.

318 { return powT(a, b); }
static complex< _Tp > powT(const _Tp &a, const complex< _Tp > &b)
Definition: complex.cpp:267
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

Definition at line 326 of file complex.cpp.

327 { return powT(a, b); }
static complex< _Tp > powT(const _Tp &a, const complex< _Tp > &b)
Definition: complex.cpp:267
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

Definition at line 335 of file complex.cpp.

336 { return powT(z_in, n); }
GLuint n
Definition: s_context.h:57
static complex< _Tp > powT(const _Tp &a, const complex< _Tp > &b)
Definition: complex.cpp:267

Definition at line 338 of file complex.cpp.

340 { return powT(a, b); }
static complex< _Tp > powT(const _Tp &a, const complex< _Tp > &b)
Definition: complex.cpp:267
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

Definition at line 330 of file complex.cpp.

332 { return powT(a, b); }
static complex< _Tp > powT(const _Tp &a, const complex< _Tp > &b)
Definition: complex.cpp:267
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

Definition at line 342 of file complex.cpp.

344 { return powT(a, b); }
static complex< _Tp > powT(const _Tp &a, const complex< _Tp > &b)
Definition: complex.cpp:267
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

Definition at line 76 of file complex_trig.cpp.

77 { return sinT(z); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > sinT(const complex< _Tp > &z)

Definition at line 80 of file complex_trig.cpp.

81 { return sinT(z); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > sinT(const complex< _Tp > &z)
_STLP_DECLSPEC complex<float> _STLP_CALL sinh ( const complex< float > &  )

Definition at line 137 of file complex_trig.cpp.

Referenced by _CIsinh(), coshT(), cosT(), CMathTest::import_checks(), rpn_sinh(), sinhf(), sinhT(), sinT(), tanhT(), tanT(), and ValarrayTest::transcendentals().

138 { return sinhT(z); }
static complex< _Tp > sinhT(const complex< _Tp > &z)
GLdouble GLdouble z
Definition: glext.h:5874

Definition at line 140 of file complex_trig.cpp.

141 { return sinhT(z); }
static complex< _Tp > sinhT(const complex< _Tp > &z)
GLdouble GLdouble z
Definition: glext.h:5874

Definition at line 144 of file complex_trig.cpp.

145 { return sinhT(z); }
static complex< _Tp > sinhT(const complex< _Tp > &z)
GLdouble GLdouble z
Definition: glext.h:5874

Definition at line 191 of file complex.cpp.

191 { return sqrtT(z); }
static complex< _Tp > sqrtT(const complex< _Tp > &z)
Definition: complex.cpp:167
GLdouble GLdouble z
Definition: glext.h:5874

Definition at line 195 of file complex.cpp.

195 { return sqrtT(z); }
static complex< _Tp > sqrtT(const complex< _Tp > &z)
Definition: complex.cpp:167
GLdouble GLdouble z
Definition: glext.h:5874
_STLP_DECLSPEC complex<float> _STLP_CALL tan ( const complex< float > &  )

Definition at line 118 of file complex_trig.cpp.

Referenced by _CItan(), app_boundary_point(), GdipCreateLineBrushFromRectWithAngle(), Global_Tan(), CMathTest::import_checks(), init_layer3(), Math_tan(), rpn_tan(), tanf(), test_tan(), and ValarrayTest::transcendentals().

119 { return tanT(z, float_limit); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > tanT(const complex< _Tp > &z, const _Tp &Tp_limit)
static _STLP_BEGIN_NAMESPACE const float float_limit

Definition at line 121 of file complex_trig.cpp.

122 { return tanT(z, double_limit); }
GLdouble GLdouble z
Definition: glext.h:5874
static const double double_limit
static complex< _Tp > tanT(const complex< _Tp > &z, const _Tp &Tp_limit)

Definition at line 125 of file complex_trig.cpp.

126 { return tanT(z, ldouble_limit); }
static const long double ldouble_limit
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > tanT(const complex< _Tp > &z, const _Tp &Tp_limit)
_STLP_DECLSPEC complex<float> _STLP_CALL tanh ( const complex< float > &  )

Definition at line 181 of file complex_trig.cpp.

Referenced by _CItanh(), CMathTest::import_checks(), rpn_tanh(), tanhf(), and ValarrayTest::transcendentals().

182 { return tanhT(z, float_limit); }
static complex< _Tp > tanhT(const complex< _Tp > &z, const _Tp &Tp_limit)
GLdouble GLdouble z
Definition: glext.h:5874
static _STLP_BEGIN_NAMESPACE const float float_limit

Definition at line 184 of file complex_trig.cpp.

185 { return tanhT(z, double_limit); }
static complex< _Tp > tanhT(const complex< _Tp > &z, const _Tp &Tp_limit)
GLdouble GLdouble z
Definition: glext.h:5874
static const double double_limit

Definition at line 188 of file complex_trig.cpp.

189 { return tanhT(z, ldouble_limit); }
static const long double ldouble_limit
static complex< _Tp > tanhT(const complex< _Tp > &z, const _Tp &Tp_limit)
GLdouble GLdouble z
Definition: glext.h:5874