42 cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL(
"cinterval::cinterval(const complex & a,const complex & b)"));
226 UncheckedSetInf(tmp,a);
227 UncheckedSetSup(tmp,b);
240 UncheckedSetSup(tmp,b);
252 UncheckedSetInf(tmp,a);
282 SetInf(tmp.re, max(Inf(a.re), Inf(b.re)));
283 SetInf(tmp.im, max(Inf(a.im), Inf(b.im)));
284 SetSup(tmp.re, min(Sup(a.re), Sup(b.re)));
285 SetSup(tmp.im, min(Sup(a.im), Sup(b.im)));
286 if (Inf(tmp.re) > Sup(tmp.re) || Inf(tmp.im) > Sup(tmp.im))
287 cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL(
"inline cinterval operator &(const cinterval & a,const cinterval & b)"));
294 SetInf(tmp.re, min(Inf(a.re), Inf(b.re)));
295 SetInf(tmp.im, min(Inf(a.im), Inf(b.im)));
296 SetSup(tmp.re, max(Sup(a.re), Sup(b.re)));
297 SetSup(tmp.im, max(Sup(a.im), Sup(b.im)));
431 return !a.re && !a.im;
436 return a.re==b.re && a.im==b.im;
441 return a.re!=b.re || a.im!=b.im;
468 if (Inf(a.re) <= Inf(b.re) || Sup(a.re) >= Sup(b.re))
470 if (Inf(a.im) <= Inf(b.im) || Sup(a.im) >= Sup(b.im))
480 if (Inf(a.re) < Inf(b.re) || Sup(a.re) > Sup(b.re))
482 if (Inf(a.im) < Inf(b.im) || Sup(a.im) > Sup(b.im))
535 if (Inf(a.re) > Sup(a.re) || Inf(a.im) > Sup(a.im))
536 cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL(
"inline cinterval & SetInf(cinterval & a,const complex & b)"));
546 if (Inf(a.re) > Sup(a.re) || Inf(a.im) > Sup(a.im))
547 cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL(
"inline cinterval & SetSup(cinterval & a,const complex & b)"));
557 if (Inf(a.re) > Sup(a.re) || Inf(a.im) > Sup(a.im))
558 cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL(
"inline cinterval & SetInf(cinterval & a,const real & b)"));
568 if (Inf(a.re) > Sup(a.re) || Inf(a.im) > Sup(a.im))
569 cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL(
"inline cinterval & SetSup(cinterval & a,const real & b)"));
641 #ifdef CXSC_FAST_COMPLEX_OPERATIONS
642 return cinterval(Re(a)*Re(b)-Im(a)*Im(b), Re(a)*Im(b)+Im(a)*Re(b));
644 return mult_operator(a,b);
650 if (0.0 <= Re(b) && 0.0 <= Im(b) ) {
651 cxscthrow(DIV_BY_ZERO(
"cinterval operator / (const cinterval&, const cinterval&)"));
654 #ifdef CXSC_FAST_COMPLEX_OPERATIONS
655 return a * (1.0 / b);
657 return div_operator(a,b);