24 #if !defined (octave_oct_cmplx_h)
25 #define octave_oct_cmplx_h 1
43 #define DEF_COMPLEXR_COMP(OP, OPS) \
45 inline bool operator OP (const std::complex<T>& a, const std::complex<T>& b) \
47 FLOAT_TRUNCATE const T ax = std::abs (a); \
48 FLOAT_TRUNCATE const T bx = std::abs (b); \
51 FLOAT_TRUNCATE const T ay = std::arg (a); \
52 FLOAT_TRUNCATE const T by = std::arg (b); \
53 if (ay == static_cast<T> (-M_PI)) \
55 if (by != static_cast<T> (-M_PI)) \
56 return static_cast<T> (M_PI) OP by; \
58 else if (by == static_cast<T> (-M_PI)) \
60 return ay OP static_cast<T> (M_PI); \
68 inline bool operator OP (const std::complex<T>& a, T b) \
70 FLOAT_TRUNCATE const T ax = std::abs (a); \
71 FLOAT_TRUNCATE const T bx = std::abs (b); \
74 FLOAT_TRUNCATE const T ay = std::arg (a); \
75 if (ay == static_cast<T> (-M_PI)) \
76 return static_cast<T> (M_PI) OP 0; \
83 inline bool operator OP (T a, const std::complex<T>& b) \
85 FLOAT_TRUNCATE const T ax = std::abs (a); \
86 FLOAT_TRUNCATE const T bx = std::abs (b); \
89 FLOAT_TRUNCATE const T by = std::arg (b); \
90 if (by == static_cast<T> (-M_PI)) \
91 return 0 OP static_cast<T> (M_PI); \
#define DEF_COMPLEXR_COMP(OP, OPS)
std::complex< float > FloatComplex
std::complex< double > Complex