STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Macros | Functions | Variables
xcomplex File Reference

Macros

#define _GENERIC_MATHC0X(FUN, VAL)
 
#define _GENERIC_MATHC1X(FUN, VAL)
 

Functions

 _TMPLT (_Ty) inline _CMPLX(_Ty) operator+(const _CMPLX(_Ty)&_Left
 
const _CMPLX (_Ty)&_Right)
 
_Tmp real (_Tmp.real()+_Right)
 
 return (_Tmp)
 
_Tmp real (_Tmp.real()-_Right)
 
_Tmp real (_Tmp.real()*_Right)
 
_Tmp imag (_Tmp.imag()*_Right)
 
_Tmp real (_Tmp.real()/_Right)
 
_Tmp imag (_Tmp.imag()/_Right)
 
 if (_Right< 0) _Count=0-_Count
 
 for (_CMPLX(_Ty) _Zv=_CMPLX(_Ty)(1);;_Tmp *=_Tmp)
 
else return (exp(_Right *log(_CMPLX(_Ty)(_Left))))
 
else return (exp(_Right *log(_Left)))
 
template<class _Ty1 , class _Ty2 >
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > polar (const _Ty1 &_Left, const _Ty2 &_Right)
 
template<class _Ty1 , class _Ty2 >
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > pow (const complex< _Ty1 > &_Left, const complex< _Ty2 > &_Right)
 
template<class _Ty1 , class _Ty2 >
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > pow (const complex< _Ty1 > &_Left, const _Ty2 &_Right)
 
template<class _Ty1 , class _Ty2 >
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > pow (const _Ty1 &_Left, const complex< _Ty2 > &_Right)
 
template<class _Ty1 , class _Ty2 >
enable_if< is_integral< _Ty1 >::value &&is_integral< _Ty2 >::value, complex< _Ty1 > >::type pow (const complex< _Ty1 > &_Left, _Ty2 &_Right)
 

Variables

const _Ty & _Right
 
unsigned int _Count = _Right
 
const _Ty & _Theta
 

Macro Definition Documentation

#define _GENERIC_MATHC0X (   FUN,
  VAL 
)
Value:
template<class _Ty> inline \
typename _Promote_to_float<_Ty>::type>::type \
FUN(_Ty) \
{ \
typedef typename _Promote_to_float<_Ty>::type type; \
return ((type)VAL); \
}
return(_Tmp)
Definition: xtr1common:57
#define _GENERIC_MATHC1X (   FUN,
  VAL 
)
Value:
template<class _Ty> inline \
typename _Promote_to_float<_Ty>::type>::type \
FUN(_Ty _Left) \
{ \
typedef typename _Promote_to_float<_Ty>::type type; \
return ((type)VAL); \
}
constexpr const _Ty &() _Left
Definition: algorithm:3590
return(_Tmp)
Definition: xtr1common:57

Function Documentation

const _CMPLX ( _Ty  )
8  { // add complex to complex
9  _CMPLX(_Ty) _Tmp(_Left);
10  return (_Tmp += _Right);
11  }
const _Ty & _Right
Definition: xcomplex:42
constexpr const _Ty &() _Left
Definition: algorithm:3590
return(_Tmp)
const _CMPLX(_Ty)&_Right)
Definition: xcomplex:7
_TMPLT ( _Ty  ) const
113  { // return +complex
114  return (_CMPLX(_Ty)(_Left));
115  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
const _CMPLX(_Ty)&_Right)
Definition: xcomplex:7
for ( _CMPLX(_Ty)  _Zv = _CMPLX(_Ty)(1); ; _Tmp *= _Tmp)
674  { // fold in _Left ^ (2 ^ _Count) as needed
675  if ((_Count & 1) != 0)
676  _Zv *= _Tmp;
677  if ((_Count >>= 1) == 0)
678  return (_Right < 0 ? _CMPLX(_Ty)(1) / _Zv : _Zv);
679  }
const _Ty & _Right
Definition: xcomplex:42
unsigned int _Count
Definition: xcomplex:668
const _CMPLX(_Ty)&_Right)
Definition: xcomplex:7
if ( )
pure virtual
_Tmp imag ( _Tmp.imag()*  _Right)
_Tmp imag ( _Tmp.imag()/  _Right)
template<class _Ty1 , class _Ty2 >
complex<typename _Common_float_type<_Ty1, _Ty2>::type> polar ( const _Ty1 &  _Left,
const _Ty2 &  _Right 
)
inline
886  { // bring mixed types to a common type
888  return (_STD polar((type)_Left, (type)_Right));
889  }
const _Ty & _Right
Definition: xcomplex:42
constexpr const _Ty &() _Left
Definition: algorithm:3590
Definition: complex:50
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > polar(const _Ty1 &_Left, const _Ty2 &_Right)
Definition: xcomplex:885
template<class _Ty1 , class _Ty2 >
complex<typename _Common_float_type<_Ty1, _Ty2>::type> pow ( const complex< _Ty1 > &  _Left,
const complex< _Ty2 > &  _Right 
)
inline
896  { // bring mixed types to a common type
898  return (_STD pow(type(_Left), type(_Right)));
899  }
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > pow(const complex< _Ty1 > &_Left, const complex< _Ty2 > &_Right)
Definition: xcomplex:895
Definition: complex:50
template<class _Ty1 , class _Ty2 >
complex<typename _Common_float_type<_Ty1, _Ty2>::type> pow ( const complex< _Ty1 > &  _Left,
const _Ty2 &  _Right 
)
inline
905  { // bring mixed types to a common type
907  return (_STD pow(type(_Left), type(_Right)));
908  }
const _Ty & _Right
Definition: xcomplex:42
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > pow(const complex< _Ty1 > &_Left, const complex< _Ty2 > &_Right)
Definition: xcomplex:895
Definition: complex:50
template<class _Ty1 , class _Ty2 >
complex<typename _Common_float_type<_Ty1, _Ty2>::type> pow ( const _Ty1 &  _Left,
const complex< _Ty2 > &  _Right 
)
inline
914  { // bring mixed types to a common type
916  return (_STD pow(type(_Left), type(_Right)));
917  }
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > pow(const complex< _Ty1 > &_Left, const complex< _Ty2 > &_Right)
Definition: xcomplex:895
constexpr const _Ty &() _Left
Definition: algorithm:3590
Definition: complex:50
template<class _Ty1 , class _Ty2 >
enable_if<is_integral<_Ty1>::value && is_integral<_Ty2>::value, complex<_Ty1> >::type pow ( const complex< _Ty1 > &  _Left,
_Ty2 &  _Right 
)
inline
924  { // raise Gaussian integer to an integer power
925  typedef complex<_Ty1> type;
926  type _Ans = type(1, 0);
927 
928  if (_Right < 0)
929  _Ans = type(0, 0); // ignore 1/type(0, 0) error
930  else if (0 < _Right)
931  { // raise to a positive power
932  for (type _Factor = _Left; ; _Factor *= _Factor)
933  { // fold in _Left^(2^N))
934  if ((_Right & 1) != 0)
935  _Ans *= _Factor;
936  if ((_Right >>= 1) == 0)
937  break;
938  }
939  }
940  return (_Ans);
941  }
const _Ty & _Right
Definition: xcomplex:42
Definition: complex:50
_Tmp real ( _Tmp.real()+  _Right)
_Tmp real ( _Tmp.real()-  _Right)
_Tmp real ( _Tmp.real()*  _Right)
_Tmp real ( _Tmp.real()/  _Right)
return ( _Tmp  )
else return ( exp(_Right *log(_CMPLX(_Ty)(_Left)))  )
else return ( exp(_Right *log(_Left))  )

Variable Documentation

unsigned int _Count = _Right
const _Ty& _Right
Initial value:
{
_CMPLX(_Ty) _Tmp(_Left)
constexpr const _Ty &() _Left
Definition: algorithm:3590
const _CMPLX(_Ty)&_Right)
Definition: xcomplex:7
const _Ty& _Theta
Initial value:
{
return (_CMPLX(_Ty)(_Rho * _CTR(_Ty)::cos(_Theta),
_Rho * _CTR(_Ty)::sin(_Theta)))
float sin(float _X) __GPU_ONLY
Calculates the sine value of the argument
Definition: amp_math.h:1010
const _Ty & _Theta
Definition: xcomplex:823
float cos(float _X) __GPU_ONLY
Calculates the cosine of the argument
Definition: amp_math.h:415
const _CMPLX(_Ty)&_Right)
Definition: xcomplex:7
#define _CTR(T)
Definition: complex:1248