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:58
#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:3722
return(_Tmp)
Definition: xtr1common:58

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:16
constexpr const _Ty &() _Left
Definition: algorithm:3722
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:3722
const _CMPLX(_Ty)&_Right)
Definition: xcomplex:7
for ( _CMPLX(_Ty)  _Zv = _CMPLX(_Ty)(1); ; _Tmp *= _Tmp)
683  { // fold in _Left ^ (2 ^ _Count) as needed
684  if ((_Count & 1) != 0)
685  _Zv *= _Tmp;
686  if ((_Count >>= 1) == 0)
687  return (_Right < 0 ? _CMPLX(_Ty)(1) / _Zv : _Zv);
688  }
const _Ty & _Right
Definition: xcomplex:16
unsigned int _Count
Definition: xcomplex:677
const _CMPLX(_Ty)&_Right)
Definition: xcomplex:7
if ( )
pure virtual
49  {
50  memset(_Destination, 0, _DestinationSize);
51 
54 
55  // Unreachable, but required to suppress /analyze warnings:
56  return EINVAL;
57  }
_SourceSize void *const _Destination
Definition: corecrt_memcpy_s.h:36
#define EINVAL
Definition: errno.h:73
#define _CRT_MEMCPY_S_VALIDATE_RETURN_ERRCODE(expr, errorcode)
Definition: corecrt_memcpy_s.h:20
#define ERANGE
Definition: errno.h:74
_SourceSize void *const _In_ rsize_t const _DestinationSize
Definition: corecrt_memcpy_s.h:36
_Source
Definition: corecrt_wstring.h:187
_SourceSize void *const _In_ rsize_t const _In_ rsize_t const _SourceSize
Definition: corecrt_memcpy_s.h:41
#define NULL
Definition: corecrt.h:158
_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
895  { // bring mixed types to a common type
897  return (_STD polar((type)_Left, (type)_Right));
898  }
const _Ty & _Right
Definition: xcomplex:16
constexpr const _Ty &() _Left
Definition: algorithm:3722
Definition: complex:46
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > polar(const _Ty1 &_Left, const _Ty2 &_Right)
Definition: xcomplex:894
template<class _Ty1 , class _Ty2 >
complex<typename _Common_float_type<_Ty1, _Ty2>::type> pow ( const complex< _Ty1 > &  _Left,
const complex< _Ty2 > &  _Right 
)
inline
905  { // bring mixed types to a common type
907  return (_STD pow(type(_Left), type(_Right)));
908  }
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > pow(const complex< _Ty1 > &_Left, const complex< _Ty2 > &_Right)
Definition: xcomplex:904
Definition: complex:46
template<class _Ty1 , class _Ty2 >
complex<typename _Common_float_type<_Ty1, _Ty2>::type> pow ( const complex< _Ty1 > &  _Left,
const _Ty2 &  _Right 
)
inline
914  { // bring mixed types to a common type
916  return (_STD pow(type(_Left), type(_Right)));
917  }
const _Ty & _Right
Definition: xcomplex:16
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > pow(const complex< _Ty1 > &_Left, const complex< _Ty2 > &_Right)
Definition: xcomplex:904
Definition: complex:46
template<class _Ty1 , class _Ty2 >
complex<typename _Common_float_type<_Ty1, _Ty2>::type> pow ( const _Ty1 &  _Left,
const complex< _Ty2 > &  _Right 
)
inline
923  { // bring mixed types to a common type
925  return (_STD pow(type(_Left), type(_Right)));
926  }
complex< typename _Common_float_type< _Ty1, _Ty2 >::type > pow(const complex< _Ty1 > &_Left, const complex< _Ty2 > &_Right)
Definition: xcomplex:904
constexpr const _Ty &() _Left
Definition: algorithm:3722
Definition: complex:46
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
933  { // raise Gaussian integer to an integer power
934  typedef complex<_Ty1> type;
935  type _Ans = type(1, 0);
936 
937  if (_Right < 0)
938  _Ans = type(0, 0); // ignore 1/type(0, 0) error
939  else if (0 < _Right)
940  { // raise to a positive power
941  for (type _Factor = _Left; ; _Factor *= _Factor)
942  { // fold in _Left^(2^N))
943  if ((_Right & 1) != 0)
944  _Ans *= _Factor;
945  if ((_Right >>= 1) == 0)
946  break;
947  }
948  }
949  return (_Ans);
950  }
const _Ty & _Right
Definition: xcomplex:16
Definition: complex:46
_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:3722
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:832
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:1244