C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
cidot.inl
00001 /*
00002 **  CXSC is a C++ library for eXtended Scientific Computing (V 2.5.4)
00003 **
00004 **  Copyright (C) 1990-2000 Institut fuer Angewandte Mathematik,
00005 **                          Universitaet Karlsruhe, Germany
00006 **            (C) 2000-2014 Wiss. Rechnen/Softwaretechnologie
00007 **                          Universitaet Wuppertal, Germany   
00008 **
00009 **  This library is free software; you can redistribute it and/or
00010 **  modify it under the terms of the GNU Library General Public
00011 **  License as published by the Free Software Foundation; either
00012 **  version 2 of the License, or (at your option) any later version.
00013 **
00014 **  This library is distributed in the hope that it will be useful,
00015 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 **  Library General Public License for more details.
00018 **
00019 **  You should have received a copy of the GNU Library General Public
00020 **  License along with this library; if not, write to the Free
00021 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 */
00023 
00024 /* CVS $Id: cidot.inl,v 1.28 2014/01/30 17:23:43 cxsc Exp $ */
00025 
00026 namespace cxsc {
00027 inline cidotprecision _cidotprecision(const complex &,const complex &) throw();
00028 inline cidotprecision _cidotprecision(const complex &,const real &) throw();
00029 inline cidotprecision _cidotprecision(const real &,const complex &) throw();
00030 inline cidotprecision _cidotprecision(const interval &,const interval &) throw();
00031 inline cidotprecision _cidotprecision(const interval &,const real &) throw();
00032 inline cidotprecision _cidotprecision(const real &,const interval &) throw();
00033 inline cidotprecision _cidotprecision(const real &) throw();
00034 inline cidotprecision _cidotprecision(const complex &) throw();
00035 inline cidotprecision _cidotprecision(const interval &) throw();
00036 inline cidotprecision _cidotprecision(const cinterval &) throw();
00037       
00038 inline cidotprecision _cidotprecision(const idotprecision &,const idotprecision &) throw();
00039 inline cidotprecision _cidotprecision(const cdotprecision &,const cdotprecision &) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL);
00040 inline cidotprecision _cidotprecision(const idotprecision &,const dotprecision &) throw();
00041 inline cidotprecision _cidotprecision(const cdotprecision &,const dotprecision &) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL);
00042 inline cidotprecision _cidotprecision(const dotprecision &,const idotprecision &) throw();
00043 inline cidotprecision _cidotprecision(const dotprecision &,const cdotprecision&) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL);
00044 inline cidotprecision _cidotprecision(const cdotprecision &) throw();
00045 inline cidotprecision _cidotprecision(const idotprecision &) throw();
00046 inline cidotprecision _cidotprecision(const dotprecision &) throw();
00047 
00048 inline cidotprecision::cidotprecision(const real & a) throw()
00049    : reinf(a), resup(reinf),
00050      iminf(0), imsup(iminf), k(0)
00051 {
00052 }
00053 
00054 inline cidotprecision::cidotprecision(const dotprecision & a) throw()
00055    : reinf(a), resup(reinf),
00056      iminf(0), imsup(iminf)
00057 {
00058         set_k(0);
00059 }
00060 
00061 inline cidotprecision::cidotprecision(const complex & a) throw()
00062    : reinf(Re(a)), resup(reinf),
00063      iminf(Im(a)), imsup(iminf), k(0)
00064 {
00065 }
00066 
00067 inline cidotprecision::cidotprecision(const cdotprecision & a) throw()
00068    : reinf(Re(a)), resup(reinf),
00069      iminf(Im(a)), imsup(iminf)
00070 {
00071         set_k(0);
00072 }
00073 
00074 inline cidotprecision::cidotprecision(const interval & a) throw()
00075    : reinf(Inf(a)), resup(Sup(a)),
00076      iminf(0),      imsup(iminf), k(0)
00077 {
00078 }
00079 
00080 inline cidotprecision::cidotprecision(const idotprecision & a) throw()
00081    : reinf(Inf(a)), resup(Sup(a)),
00082      iminf(0),      imsup(iminf)
00083 {
00084         set_k(0);
00085 }
00086 
00087 inline cidotprecision::cidotprecision(const cinterval & a) throw()
00088    : reinf(InfRe(a)), resup(SupRe(a)),
00089      iminf(InfIm(a)), imsup(SupIm(a)), k(0)
00090 {
00091 }
00092 
00093 inline cidotprecision::cidotprecision(const cidotprecision & a) throw()
00094    : reinf(a.reinf), resup(a.resup),
00095      iminf(a.iminf), imsup(a.imsup)
00096 {
00097         set_k(a.get_k());
00098 }
00099 
00100 inline cidotprecision::cidotprecision(const idotprecision & a, const idotprecision & b) throw()
00101    : reinf(Inf(a)), resup(Sup(a)),
00102      iminf(Inf(b)), imsup(Sup(b))
00103 {
00104         set_k(0);
00105 }
00106 
00107 // ---- Typwandlungen ----
00113 inline cidotprecision _cidotprecision(const complex & a,const complex & b) throw()
00114 {
00115    return _cidotprecision(_cinterval(a,b));
00116 }
00117 
00123 inline cidotprecision _cidotprecision(const complex & a,const real & b) throw()
00124 {
00125    return _cidotprecision(_cinterval(a,b));
00126 }
00127 
00133 inline cidotprecision _cidotprecision(const real & a,const complex & b) throw()
00134 {
00135    return _cidotprecision(_cinterval(a,b));
00136 }
00137 
00143 inline cidotprecision _cidotprecision(const interval & a,const interval & b) throw()
00144 {
00145    return _cidotprecision(_cinterval(a,b));
00146 }
00147 
00153 inline cidotprecision _cidotprecision(const interval & a,const real &b) throw()
00154 {
00155    return _cidotprecision(_cinterval(a,b));
00156 }
00157 
00163 inline cidotprecision _cidotprecision(const real & a,const interval & b) throw()
00164 {
00165    return _cidotprecision(_cinterval(a,b));
00166 }
00167 
00173 inline cidotprecision _cidotprecision(const real & a) throw()
00174 {
00175    return _cidotprecision(_cinterval(a));
00176 }
00177 
00183 inline cidotprecision _cidotprecision(const complex & a) throw()
00184 {
00185    return _cidotprecision(_cinterval(a));
00186 }
00187 
00193 inline cidotprecision _cidotprecision(const interval & a) throw()
00194 {
00195    return _cidotprecision(_cinterval(a));
00196 }
00197 
00203 inline cidotprecision _cidotprecision(const cinterval & a) throw()
00204 {
00205    cidotprecision tmp;
00206    tmp.reinf=Inf(Re(a));
00207    tmp.resup=Sup(Re(a));
00208    tmp.iminf=Inf(Im(a));
00209    tmp.imsup=Sup(Im(a));
00210    return tmp;
00211 }
00212 
00218 inline cidotprecision _cidotprecision(const idotprecision & a,const idotprecision & b) throw()
00219 {
00220    cidotprecision tmp;
00221    tmp.reinf=Inf(a);
00222    tmp.resup=Sup(a);
00223    tmp.iminf=Inf(b);
00224    tmp.imsup=Sup(b);
00225    return tmp;
00226 }
00227 
00233 inline cidotprecision _cidotprecision(const cdotprecision & a,const cdotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00234 {
00235    cidotprecision tmp;
00236    tmp.reinf=Re(a);
00237    tmp.resup=Re(b);
00238    tmp.iminf=Im(a);
00239    tmp.imsup=Im(b);
00240    if(tmp.reinf>tmp.resup || tmp.iminf>tmp.imsup)
00241       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision _cidotprecision(const cdotprecision & a,const cdotprecision & b)"));
00242    return tmp;
00243 }
00244 
00250 inline cidotprecision _cidotprecision(const idotprecision & a,const dotprecision & b) throw()
00251 {
00252    cidotprecision tmp;
00253    tmp.reinf=Inf(a);
00254    tmp.resup=Sup(a);
00255    tmp.iminf=tmp.imsup=b;
00256    return tmp;   
00257 }
00258 
00264 inline cidotprecision _cidotprecision(const cdotprecision & a,const dotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00265 {
00266    cidotprecision tmp;
00267    tmp.reinf=Re(a);
00268    tmp.iminf=Re(a);
00269    tmp.resup=b;
00270    tmp.imsup=0.0;
00271    if(tmp.reinf>tmp.resup || tmp.iminf>tmp.imsup)
00272       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision _cidotprecision(const cdotprecision & a,const dotprecision & b)"));
00273    return tmp;
00274 }
00275 
00281 inline cidotprecision _cidotprecision(const dotprecision & a,const idotprecision & b) throw()
00282 {
00283    cidotprecision tmp;
00284    tmp.reinf=tmp.resup=a;
00285    tmp.iminf=Inf(b);
00286    tmp.imsup=Sup(b);
00287    return tmp;   
00288 }
00289 
00295 inline cidotprecision _cidotprecision(const dotprecision & a,const cdotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00296 {
00297    cidotprecision tmp;
00298    tmp.reinf=a;
00299    tmp.iminf=0.0;
00300    tmp.resup=Re(b);
00301    tmp.imsup=Im(b);
00302    if(tmp.reinf>tmp.resup || tmp.iminf>tmp.imsup)
00303       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision _cidotprecision(const dotprecision & a,const cdotprecision & b)"));
00304    return tmp;  
00305 }
00306 
00312 inline cidotprecision _cidotprecision(const cdotprecision & a) throw()
00313 {
00314    cidotprecision tmp;
00315    tmp.reinf=tmp.resup=Re(a);
00316    tmp.iminf=tmp.imsup=Im(a);
00317    return tmp;
00318 }
00319 
00325 inline cidotprecision _cidotprecision(const idotprecision & a) throw()
00326 {
00327    cidotprecision tmp;
00328    tmp.reinf=Inf(a);
00329    tmp.resup=Sup(a);
00330    tmp.iminf=tmp.imsup=0.0;
00331    return tmp;
00332 }
00333 
00339 inline cidotprecision _cidotprecision(const dotprecision & a) throw()
00340 {
00341    cidotprecision tmp;
00342    tmp.reinf=tmp.resup=a;
00343    tmp.iminf=tmp.imsup=0.0;
00344    return tmp;
00345 }
00346 
00352 inline cidotprecision _unchecked_cidotprecision(const complex & a,const complex & b) throw()
00353 {
00354    cidotprecision tmp;
00355    tmp.reinf=Re(a);
00356    tmp.resup=Re(b);
00357    tmp.iminf=Im(a);
00358    tmp.imsup=Im(b);
00359    return tmp;
00360 }
00361 
00367 inline cidotprecision _unchecked_cidotprecision(const complex & a,const real & b) throw()
00368 {
00369    cidotprecision tmp;
00370    tmp.reinf=Re(a);
00371    tmp.iminf=Re(a);
00372    tmp.resup=b;
00373    tmp.imsup=0.0;
00374    return tmp;
00375 }
00376 
00382 inline cidotprecision _unchecked_cidotprecision(const real & a,const complex & b) throw()
00383 {
00384    cidotprecision tmp;
00385    tmp.reinf=a;
00386    tmp.iminf=0.0;
00387    tmp.resup=Re(b);
00388    tmp.imsup=Im(b);
00389    return tmp;  
00390 }
00391 
00397 inline cidotprecision _unchecked_cidotprecision(const cdotprecision & a,const cdotprecision & b) throw()
00398 {
00399    cidotprecision tmp;
00400    tmp.reinf=Re(a);
00401    tmp.resup=Re(b);
00402    tmp.iminf=Im(a);
00403    tmp.imsup=Im(b);
00404    return tmp;
00405 }
00406 
00412 inline cidotprecision _unchecked_cidotprecision(const cdotprecision & a,const dotprecision & b) throw()
00413 {
00414    cidotprecision tmp;
00415    tmp.reinf=Re(a);
00416    tmp.iminf=Re(a);
00417    tmp.resup=b;
00418    tmp.imsup=0.0;
00419    return tmp;
00420 }
00421 
00427 inline cidotprecision _unchecked_cidotprecision(const dotprecision & a,const cdotprecision & b) throw()
00428 {
00429    cidotprecision tmp;
00430    tmp.reinf=a;
00431    tmp.iminf=0.0;
00432    tmp.resup=Re(b);
00433    tmp.imsup=Im(b);
00434    return tmp;  
00435 }
00436 
00437 
00438 
00439 // ---- Standardfunkt ---- (arithmetische Operatoren)
00440 inline cidotprecision operator -(cidotprecision a) throw()
00441 {
00442    dotprecision save=-a.reinf;
00443    a.reinf=-a.resup;
00444    a.resup=save;
00445    
00446    save=-a.iminf;
00447    a.iminf=-a.imsup;
00448    a.imsup=save;
00449    
00450    return a;
00451 }
00452 
00453 inline cidotprecision operator +(const cidotprecision &a) throw()
00454 {
00455    return a;
00456 }
00457 
00458 inline cidotprecision operator +(const cidotprecision & a,const cidotprecision & b) throw()
00459 {
00460    cidotprecision tmp(a);
00461    tmp.reinf+=b.reinf;
00462    tmp.resup+=b.resup;
00463    tmp.iminf+=b.iminf;
00464    tmp.imsup+=b.imsup;
00465    return tmp;
00466 }
00467 
00468 inline cidotprecision operator -(const cidotprecision & a,const cidotprecision & b) throw()
00469 {
00470    cidotprecision tmp(a);
00471    tmp.reinf-=b.resup;
00472    tmp.resup-=b.reinf;
00473    tmp.iminf-=b.imsup;
00474    tmp.imsup-=b.iminf;
00475    return tmp;
00476 }
00477 
00478 inline cidotprecision operator |(const cidotprecision & a,const cidotprecision & b) throw()
00479 {
00480    cidotprecision tmp(a);
00481    if(tmp.reinf>b.reinf)
00482       tmp.reinf=b.reinf;
00483    if(tmp.iminf>b.iminf)
00484       tmp.iminf=b.iminf;
00485    if(tmp.resup<b.resup)
00486       tmp.resup=b.resup;
00487    if(tmp.imsup<b.imsup)
00488       tmp.imsup=b.imsup;
00489    return tmp;   
00490 }
00491 
00492 inline cidotprecision operator &(const cidotprecision & a,const cidotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00493 {
00494    cidotprecision tmp(a);
00495    if(tmp.reinf<b.reinf)
00496       tmp.reinf=b.reinf;
00497    if(tmp.iminf<b.iminf)
00498       tmp.iminf=b.iminf;
00499    if(tmp.resup>b.resup)
00500       tmp.resup=b.resup;
00501    if(tmp.imsup>b.imsup)
00502       tmp.imsup=b.imsup;
00503       
00504    if (tmp.reinf >tmp.resup || tmp.iminf > tmp.imsup) 
00505       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision operator &(const cidotprecision & a,const cidotprecision & b)"));
00506 
00507    return tmp;   
00508 }
00509 
00510 inline cidotprecision & operator +=(cidotprecision & a, const cidotprecision & b) throw()
00511 {
00512    a.reinf+=b.reinf;
00513    a.resup+=b.resup;
00514    a.iminf+=b.iminf;
00515    a.imsup+=b.imsup;
00516    return a;
00517 }
00518 
00519 inline cidotprecision & operator -=(cidotprecision & a, const cidotprecision & b) throw()
00520 {
00521    a.reinf-=b.resup;
00522    a.resup-=b.reinf;
00523    a.iminf-=b.imsup;
00524    a.imsup-=b.iminf;
00525    return a;
00526 }
00527 
00528 inline cidotprecision & operator |=(cidotprecision & a, const cidotprecision & b) throw()
00529 {
00530    if(a.reinf>b.reinf)
00531       a.reinf=b.reinf;
00532    if(a.resup<b.resup)
00533       a.resup=b.resup;
00534    if(a.iminf>b.iminf)
00535       a.iminf=b.iminf;
00536    if(a.imsup<b.imsup)
00537       a.imsup=b.imsup;   
00538    return a;
00539 }
00540 
00541 inline cidotprecision & operator &=(cidotprecision & a, const cidotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00542 {
00543    if(a.reinf<b.reinf)
00544       a.reinf=b.reinf;
00545    if(a.resup>b.resup)
00546       a.resup=b.resup;
00547    if(a.iminf<b.iminf)
00548       a.iminf=b.iminf;
00549    if(a.imsup>b.imsup)
00550       a.imsup=b.imsup;   
00551    
00552    if (a.reinf >a.resup || a.iminf > a.imsup) 
00553       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision operator &=(cidotprecision & a,const cidotprecision & b)"));
00554 
00555    return a;
00556 }
00557 
00558 
00559 // CID-R
00560 
00561 inline cidotprecision operator +(const cidotprecision & a,const real & b) throw()
00562 {
00563    cidotprecision tmp(a);
00564    return tmp+=b;   
00565 }
00566 
00567 inline cidotprecision operator +(const real & a,const cidotprecision & b) throw()
00568 {
00569    cidotprecision tmp(b);
00570    return tmp+=a;
00571 }
00572 
00573 inline cidotprecision operator -(const cidotprecision & a,const real & b) throw()
00574 {
00575    cidotprecision tmp(a);
00576    return tmp-=b;
00577 }
00578 
00579 inline cidotprecision operator -(const real & a,const cidotprecision & b) throw()
00580 {
00581    cidotprecision tmp(-b);
00582    return tmp+=a;
00583 }
00584 
00585 inline cidotprecision operator |(const cidotprecision & a,const real & b) throw()
00586 {
00587    cidotprecision tmp(a);
00588    return tmp|=_cinterval(b);
00589 }
00590 
00591 inline cidotprecision operator |(const real & a,const cidotprecision & b) throw()
00592 {
00593    cidotprecision tmp(b);
00594    return tmp|=_cinterval(a);   
00595 }
00596 
00597 inline cidotprecision operator &(const cidotprecision & a,const real & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00598 {
00599    cidotprecision tmp(a);
00600    return tmp&=_cinterval(b);   
00601 }
00602 
00603 inline cidotprecision operator &(const real & a,const cidotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00604 {
00605    cidotprecision tmp(b);
00606    return tmp&=_cinterval(a);   
00607 }
00608 
00609 inline cidotprecision & operator +=(cidotprecision & a, const real & b) throw()
00610 {
00611    a.reinf+=b;
00612    a.resup+=b;
00613    return a;
00614 }
00615 
00616 inline cidotprecision & operator -=(cidotprecision & a, const real & b) throw()
00617 {
00618    a.reinf-=b;
00619    a.resup-=b;
00620    return a;
00621 }
00622 
00623 inline cidotprecision & operator |=(cidotprecision & a, const real & b) throw()
00624 {
00625    return a|=_cinterval(b);
00626 }
00627 
00628 inline cidotprecision & operator &=(cidotprecision & a, const real & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00629 {
00630    return a&=_cinterval(b);
00631 }
00632 
00633 // CID-C
00634 
00635 inline cidotprecision operator +(const cidotprecision & a,const complex & b) throw()
00636 {
00637    cidotprecision tmp(a);
00638    return tmp+=b;   
00639 }
00640 
00641 inline cidotprecision operator +(const complex & a,const cidotprecision & b) throw()
00642 {
00643    cidotprecision tmp(b);
00644    return tmp+=a;
00645 }
00646 
00647 inline cidotprecision operator -(const cidotprecision & a,const complex & b) throw()
00648 {
00649    cidotprecision tmp(a);
00650    return tmp-=b;
00651 }
00652 
00653 inline cidotprecision operator -(const complex & a,const cidotprecision & b) throw()
00654 {
00655    cidotprecision tmp(-b);
00656    return tmp+=a;
00657 }
00658 
00659 inline cidotprecision operator |(const cidotprecision & a,const complex & b) throw()
00660 {
00661    cidotprecision tmp(a);
00662    return tmp|=_cinterval(b);
00663 }
00664 
00665 inline cidotprecision operator |(const complex & a,const cidotprecision & b) throw()
00666 {
00667    cidotprecision tmp(b);
00668    return tmp|=_cinterval(a);   
00669 }
00670 
00671 inline cidotprecision operator &(const cidotprecision & a,const complex & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00672 {
00673    cidotprecision tmp(a);
00674    return tmp&=_cinterval(b);   
00675 }
00676 
00677 inline cidotprecision operator &(const complex & a,const cidotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00678 {
00679    cidotprecision tmp(b);
00680    return tmp&=_cinterval(a);   
00681 }
00682 
00683 inline cidotprecision & operator +=(cidotprecision & a, const complex & b) throw()
00684 {
00685    a.reinf+=Re(b);
00686    a.resup+=Re(b);
00687    a.iminf+=Im(b);
00688    a.imsup+=Im(b);
00689    return a;
00690 }
00691 
00692 inline cidotprecision & operator -=(cidotprecision & a, const complex & b) throw()
00693 {
00694    a.reinf-=Re(b);
00695    a.resup-=Re(b);
00696    a.iminf-=Im(b);
00697    a.iminf-=Im(b);
00698    return a;
00699 }
00700 
00701 inline cidotprecision & operator |=(cidotprecision & a, const complex & b) throw()
00702 {
00703    return a|=_cinterval(b);
00704 }
00705 
00706 inline cidotprecision & operator &=(cidotprecision & a, const complex & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00707 {
00708    return a&=_cinterval(b);
00709 }
00710 
00711 // CID-I
00712 
00713 inline cidotprecision operator +(const cidotprecision & a,const interval & b) throw()
00714 {
00715    cidotprecision tmp(a);
00716    return tmp+=b;   
00717 }
00718 
00719 inline cidotprecision operator +(const interval & a,const cidotprecision & b) throw()
00720 {
00721    cidotprecision tmp(b);
00722    return tmp+=a;
00723 }
00724 
00725 inline cidotprecision operator -(const cidotprecision & a,const interval & b) throw()
00726 {
00727    cidotprecision tmp(a);
00728    return tmp-=b;
00729 }
00730 
00731 inline cidotprecision operator -(const interval & a,const cidotprecision & b) throw()
00732 {
00733    cidotprecision tmp(-b);
00734    return tmp+=a;
00735 }
00736 
00737 inline cidotprecision operator |(const cidotprecision & a,const interval & b) throw()
00738 {
00739    cidotprecision tmp(a);
00740    return tmp|=_cinterval(b);
00741 }
00742 
00743 inline cidotprecision operator |(const interval & a,const cidotprecision & b) throw()
00744 {
00745    cidotprecision tmp(b);
00746    return tmp|=_cinterval(a);   
00747 }
00748 
00749 inline cidotprecision operator &(const cidotprecision & a,const interval & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00750 {
00751    cidotprecision tmp(a);
00752    return tmp&=_cinterval(b);   
00753 }
00754 
00755 inline cidotprecision operator &(const interval & a,const cidotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00756 {
00757    cidotprecision tmp(b);
00758    return tmp&=_cinterval(a);   
00759 }
00760 
00761 inline cidotprecision & operator +=(cidotprecision & a, const interval & b) throw()
00762 {
00763    a.reinf+=Inf(b);
00764    a.resup+=Sup(b);
00765    return a;
00766 }
00767 
00768 inline cidotprecision & operator -=(cidotprecision & a, const interval & b) throw()
00769 {
00770    a.reinf-=Sup(b);
00771    a.resup-=Inf(b);
00772    return a;
00773 }
00774 
00775 inline cidotprecision & operator |=(cidotprecision & a, const interval & b) throw()
00776 {
00777    return a|=_cinterval(b);
00778 }
00779 
00780 inline cidotprecision & operator &=(cidotprecision & a, const interval & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00781 {
00782    return a&=_cinterval(b);
00783 }
00784 
00785 // CID-CI
00786 
00787 inline cidotprecision operator +(const cidotprecision & a,const cinterval & b) throw()
00788 {
00789    cidotprecision tmp(a);
00790    return tmp+=b;   
00791 }
00792 
00793 inline cidotprecision operator +(const cinterval & a,const cidotprecision & b) throw()
00794 {
00795    cidotprecision tmp(b);
00796    return tmp+=a;
00797 }
00798 
00799 inline cidotprecision operator -(const cidotprecision & a,const cinterval & b) throw()
00800 {
00801    cidotprecision tmp(a);
00802    return tmp-=b;
00803 }
00804 
00805 inline cidotprecision operator -(const cinterval & a,const cidotprecision & b) throw()
00806 {
00807    cidotprecision tmp(-b);
00808    return tmp+=a;
00809 }
00810 
00811 inline cidotprecision operator |(const cidotprecision & a,const cinterval & b) throw()
00812 {
00813    cidotprecision tmp(a);
00814    return tmp|=b;
00815 }
00816 
00817 inline cidotprecision operator |(const cinterval & a,const cidotprecision & b) throw()
00818 {
00819    cidotprecision tmp(b);
00820    return tmp|=a;   
00821 }
00822 
00823 inline cidotprecision operator &(const cidotprecision & a,const cinterval & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00824 {
00825    cidotprecision tmp(a);
00826    return tmp&=b;   
00827 }
00828 
00829 inline cidotprecision operator &(const cinterval & a,const cidotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00830 {
00831    cidotprecision tmp(b);
00832    return tmp&=a;   
00833 }
00834 
00835 inline cidotprecision & operator +=(cidotprecision & a, const cinterval & b) throw()
00836 {
00837    a.reinf+=Inf(Re(b));
00838    a.resup+=Sup(Re(b));
00839    a.iminf+=Inf(Im(b));
00840    a.imsup+=Sup(Im(b));
00841    return a;
00842 }
00843 
00844 inline cidotprecision & operator -=(cidotprecision & a, const cinterval & b) throw()
00845 {
00846    a.reinf-=Sup(Re(b));
00847    a.resup-=Inf(Re(b));
00848    a.iminf-=Sup(Im(b));
00849    a.imsup-=Inf(Im(b));
00850    return a;
00851 }
00852 
00853 inline cidotprecision & operator |=(cidotprecision & a, const cinterval & b) throw()
00854 {
00855    if(Sup(Re(b))>a.resup)
00856       a.resup=Sup(Re(b));
00857    if(Inf(Re(b))<a.reinf)
00858       a.reinf=Inf(Re(b));
00859    if(Sup(Im(b))>a.imsup)
00860       a.imsup=Sup(Im(b));
00861    if(Inf(Im(b))<a.iminf)
00862       a.iminf=Inf(Im(b));
00863    return a;
00864 }
00865 
00866 inline cidotprecision & operator &=(cidotprecision & a, const cinterval & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00867 {
00868    if(Sup(Re(b))<a.resup)
00869       a.resup=Sup(Re(b));
00870    if(Inf(Re(b))>a.reinf)
00871       a.reinf=Inf(Re(b));
00872    if(Sup(Im(b))<a.imsup)
00873       a.imsup=Sup(Im(b));
00874    if(Inf(Im(b))>a.iminf)
00875       a.iminf=Inf(Im(b));
00876 
00877    if (a.reinf >a.resup || a.iminf > a.imsup) 
00878       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision operator &=(cidotprecision & a,const cinterval & b)"));
00879 
00880    return a;
00881 }
00882 
00883 // CID-D
00884 
00885 inline cidotprecision operator +(const cidotprecision & a,const dotprecision & b) throw()
00886 {
00887    cidotprecision tmp(a);
00888    return tmp+=b;   
00889 }
00890 
00891 inline cidotprecision operator +(const dotprecision & a,const cidotprecision & b) throw()
00892 {
00893    cidotprecision tmp(b);
00894    return tmp+=a;
00895 }
00896 
00897 inline cidotprecision operator -(const cidotprecision & a,const dotprecision & b) throw()
00898 {
00899    cidotprecision tmp(a);
00900    return tmp-=b;
00901 }
00902 
00903 inline cidotprecision operator -(const dotprecision & a,const cidotprecision & b) throw()
00904 {
00905    cidotprecision tmp(-b);
00906    return tmp+=a;
00907 }
00908 
00909 inline cidotprecision operator |(const cidotprecision & a,const dotprecision & b) throw()
00910 {
00911    cidotprecision tmp(a);
00912    return tmp|=b;
00913 }
00914 
00915 inline cidotprecision operator |(const dotprecision & a,const cidotprecision & b) throw()
00916 {
00917    cidotprecision tmp(b);
00918    return tmp|=a;
00919 }
00920 
00921 inline cidotprecision operator &(const cidotprecision & a,const dotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00922 {
00923    cidotprecision tmp(a);
00924    return tmp&=b;
00925 }
00926 
00927 inline cidotprecision operator &(const dotprecision & a,const cidotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00928 {
00929    cidotprecision tmp(b);
00930    return tmp&=a;
00931 }
00932 
00933 inline cidotprecision & operator +=(cidotprecision & a, const dotprecision & b) throw()
00934 {
00935    a.reinf+=b;
00936    a.resup+=b;
00937    return a;
00938 }
00939 
00940 inline cidotprecision & operator -=(cidotprecision & a, const dotprecision & b) throw()
00941 {
00942    a.reinf-=b;
00943    a.resup-=b;
00944    return a;
00945 }
00946 
00947 inline cidotprecision & operator |=(cidotprecision & a, const dotprecision & b) throw()
00948 {
00949    if(b<a.reinf)
00950       a.reinf=b;
00951    if(b>a.resup)
00952       a.resup=b;
00953    if(0.<a.iminf)
00954       a.reinf=0.;
00955    if(0.>a.imsup)
00956       a.imsup=0.;
00957    return a;
00958 }
00959 
00960 inline cidotprecision & operator &=(cidotprecision & a, const dotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
00961 {
00962    if(b>a.reinf)
00963       a.reinf=b;
00964    if(b<a.resup)
00965       a.resup=b;
00966    if(0.>a.iminf)
00967       a.reinf=0.;
00968    if(0.<a.imsup)
00969       a.imsup=0.;
00970       
00971    if (a.reinf >a.resup || a.iminf > a.imsup) 
00972       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision operator &=(cidotprecision & a,const dotprecision & b)"));
00973 
00974    return a;   
00975 }
00976 
00977 // CID-CD
00978 
00979 inline cidotprecision operator +(const cidotprecision & a,const cdotprecision & b) throw()
00980 {
00981    cidotprecision tmp(a);
00982    return tmp+=b;   
00983 }
00984 
00985 inline cidotprecision operator +(const cdotprecision & a,const cidotprecision & b) throw()
00986 {
00987    cidotprecision tmp(b);
00988    return tmp+=a;
00989 }
00990 
00991 inline cidotprecision operator -(const cidotprecision & a,const cdotprecision & b) throw()
00992 {
00993    cidotprecision tmp(a);
00994    return tmp-=b;
00995 }
00996 
00997 inline cidotprecision operator -(const cdotprecision & a,const cidotprecision & b) throw()
00998 {
00999    cidotprecision tmp(-b);
01000    return tmp+=a;
01001 }
01002 
01003 inline cidotprecision operator |(const cidotprecision & a,const cdotprecision & b) throw()
01004 {
01005    cidotprecision tmp(a);
01006    return tmp|=b;
01007 }
01008 
01009 inline cidotprecision operator |(const cdotprecision & a,const cidotprecision & b) throw()
01010 {
01011    cidotprecision tmp(b);
01012    return tmp|=a;
01013 }
01014 
01015 inline cidotprecision operator &(const cidotprecision & a,const cdotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
01016 {
01017    cidotprecision tmp(a);
01018    return tmp&=b;
01019 }
01020 
01021 inline cidotprecision operator &(const cdotprecision & a,const cidotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
01022 {
01023    cidotprecision tmp(b);
01024    return tmp&=a;
01025 }
01026 
01027 inline cidotprecision & operator +=(cidotprecision & a, const cdotprecision & b) throw()
01028 {
01029    a.reinf+=Re(b);
01030    a.resup+=Re(b);
01031    a.iminf+=Im(b);
01032    a.imsup+=Im(b);
01033    return a;
01034 }
01035 
01036 inline cidotprecision & operator -=(cidotprecision & a, const cdotprecision & b) throw()
01037 {
01038    a.reinf-=Re(b);
01039    a.resup-=Re(b);
01040    a.iminf-=Im(b);
01041    a.imsup-=Im(b);
01042    return a;
01043 }
01044 
01045 inline cidotprecision & operator |=(cidotprecision & a, const cdotprecision & b) throw()
01046 {
01047    if(Re(b)<a.reinf)
01048       a.reinf=Re(b);
01049    if(Re(b)>a.resup)
01050       a.resup=Re(b);
01051    if(Im(b)<a.iminf)
01052       a.reinf=Im(b);
01053    if(Im(b)>a.imsup)
01054       a.imsup=Im(b);
01055    return a;
01056 }
01057 
01058 inline cidotprecision & operator &=(cidotprecision & a, const cdotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
01059 {
01060    if(Re(b)>a.reinf)
01061       a.reinf=Re(b);
01062    if(Re(b)<a.resup)
01063       a.resup=Re(b);
01064    if(Im(b)>a.iminf)
01065       a.reinf=Im(b);
01066    if(Im(b)<a.imsup)
01067       a.imsup=Im(b);
01068       
01069    if (a.reinf >a.resup || a.iminf > a.imsup) 
01070       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision operator &=(cidotprecision & a,const cdotprecision & b)"));
01071 
01072    return a;   
01073 }
01074 
01075 
01076 // CID-ID
01077 
01078 inline cidotprecision operator +(const cidotprecision & a,const idotprecision & b) throw()
01079 {
01080    cidotprecision tmp(a);
01081    return tmp+=b;   
01082 }
01083 
01084 inline cidotprecision operator +(const idotprecision & a,const cidotprecision & b) throw()
01085 {
01086    cidotprecision tmp(b);
01087    return tmp+=a;
01088 }
01089 
01090 inline cidotprecision operator -(const cidotprecision & a,const idotprecision & b) throw()
01091 {
01092    cidotprecision tmp(a);
01093    return tmp-=b;
01094 }
01095 
01096 inline cidotprecision operator -(const idotprecision & a,const cidotprecision & b) throw()
01097 {
01098    cidotprecision tmp(-b);
01099    return tmp+=a;
01100 }
01101 
01102 inline cidotprecision operator |(const cidotprecision & a,const idotprecision & b) throw()
01103 {
01104    cidotprecision tmp(a);
01105    return tmp|=b;
01106 }
01107 
01108 inline cidotprecision operator |(const idotprecision & a,const cidotprecision & b) throw()
01109 {
01110    cidotprecision tmp(b);
01111    return tmp|=a;
01112 }
01113 
01114 inline cidotprecision operator &(const cidotprecision & a,const idotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
01115 {
01116    cidotprecision tmp(a);
01117    return tmp&=b;
01118 }
01119 
01120 inline cidotprecision operator &(const idotprecision & a,const cidotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
01121 {
01122    cidotprecision tmp(b);
01123    return tmp&=a;
01124 }
01125 
01126 inline cidotprecision & operator +=(cidotprecision & a, const idotprecision & b) throw()
01127 {
01128    a.reinf+=Inf(b);
01129    a.resup+=Sup(b);
01130    return a;
01131 }
01132 
01133 inline cidotprecision & operator -=(cidotprecision & a, const idotprecision & b) throw()
01134 {
01135    a.reinf-=Sup(b);
01136    a.resup-=Inf(b);
01137    return a;
01138 }
01139 
01140 inline cidotprecision & operator |=(cidotprecision & a, const idotprecision & b) throw()
01141 {
01142    if(Inf(b)<a.reinf)
01143       a.reinf=Inf(b);
01144    if(Sup(b)>a.resup)
01145       a.resup=Sup(b);
01146    if(0.<a.iminf)
01147       a.reinf=0.;
01148    if(0.>a.imsup)
01149       a.imsup=0.;
01150    return a;
01151 }
01152 
01153 inline cidotprecision & operator &=(cidotprecision & a, const idotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
01154 {
01155    if(Inf(b)>a.reinf)
01156       a.reinf=Inf(b);
01157    if(Sup(b)<a.resup)
01158       a.resup=Sup(b);
01159    if(0.>a.iminf)
01160       a.reinf=0.;
01161    if(0.<a.imsup)
01162       a.imsup=0.;
01163       
01164    if (a.reinf >a.resup || a.iminf > a.imsup) 
01165       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision operator &=(cidotprecision & a,const idotprecision & b)"));
01166 
01167    return a;   
01168 }
01169 
01170 
01171 // ---- Vergleichsop. ----
01172 inline bool operator !(const cidotprecision & a) throw()
01173 {
01174    return a.reinf<=0. && a.resup>=0. && a.iminf<=0. && a.imsup>=0.;
01175 }
01176 
01177 /*inline      cidotprecision::operator void *() const throw()
01178 {
01179    if(reinf>0. || resup<0. || iminf>0. || imsup<0.)
01180       return (void *)1;
01181 
01182    return (void *)0;   
01183 }*/
01184 
01185 inline bool operator ==(const cidotprecision & a,const cidotprecision & b) throw()
01186 {
01187    return a.reinf==b.reinf && a.resup==b.resup && a.iminf==b.iminf && a.imsup==b.imsup;
01188 }
01189 
01190 inline bool operator !=(const cidotprecision & a,const cidotprecision & b) throw()
01191 {
01192    return a.reinf!=b.reinf || a.resup!=b.resup || a.iminf!=b.iminf || a.imsup!=b.imsup;
01193 }
01194 
01195 // CID-R
01196 
01197 inline bool operator== (const cidotprecision & a, const real & b)    throw()
01198 {
01199    return a.reinf==b && a.resup==b && a.iminf==0. && a.imsup==0.;
01200 }
01201 
01202 inline bool operator== (const real & a, const cidotprecision & b)    throw()
01203 {
01204    return b.reinf==a && b.resup==a && b.iminf==0. && b.imsup==0.;
01205 }
01206 
01207 inline bool operator!= (const cidotprecision & a, const real & b)    throw()
01208 {
01209    return a.reinf!=b || a.resup!=b || a.iminf!=0. || a.imsup!=0.;
01210 }
01211 
01212 inline bool operator!= (const real & a, const cidotprecision & b)    throw()
01213 {
01214    return b.reinf!=a || b.resup!=a || b.iminf!=0. || b.imsup!=0.;
01215 }
01216 
01217 // CID-C
01218 
01219 inline bool operator== (const cidotprecision & a, const complex & b)    throw()
01220 {
01221    return a.reinf==Re(b) && a.resup==Re(b) && a.iminf==Im(b) && a.imsup==Im(b);
01222 }
01223 
01224 inline bool operator== (const complex & a, const cidotprecision & b)    throw()
01225 {
01226    return b.reinf==Re(a) && b.resup==Re(a) && b.iminf==Im(a) && b.imsup==Im(a);
01227 }
01228 
01229 inline bool operator!= (const cidotprecision & a, const complex & b)    throw()
01230 {
01231    return a.reinf!=Re(b) || a.resup!=Re(b) || a.iminf!=Im(a) || a.imsup!=Im(a);
01232 }
01233 
01234 inline bool operator!= (const complex & a, const cidotprecision & b)    throw()
01235 {
01236    return b.reinf!=Re(a) || b.resup!=Re(a) || b.iminf!=Im(a) || b.imsup!=Im(a);
01237 }
01238 
01239 // CID-I
01240 
01241 inline bool operator== (const cidotprecision & a, const interval & b)    throw()
01242 {
01243    return a.reinf==Inf(b) && a.resup==Sup(b) && a.iminf==0. && a.imsup==0.;
01244 }
01245 
01246 inline bool operator== (const interval & a, const cidotprecision & b)    throw()
01247 {
01248    return b.reinf==Inf(a) && b.resup==Sup(a) && b.iminf==0. && b.imsup==0.;
01249 }
01250 
01251 inline bool operator!= (const cidotprecision & a, const interval & b)    throw()
01252 {
01253    return a.reinf!=Inf(b) || a.resup!=Sup(b) || a.iminf!=0. || a.imsup!=0.;
01254 }
01255 
01256 inline bool operator!= (const interval & a, const cidotprecision & b)    throw()
01257 {
01258    return b.reinf!=Inf(a) || b.resup!=Sup(b) || b.iminf!=0. || b.imsup!=0.;
01259 }
01260 
01261 // CID-CI
01262 
01263 inline bool operator== (const cidotprecision & a, const cinterval & b)    throw()
01264 {
01265    return a.reinf==Inf(Re(b)) && a.resup==Sup(Re(b)) && a.iminf==Inf(Im(b)) && a.imsup==Sup(Im(b));
01266 }
01267 
01268 inline bool operator== (const cinterval & a, const cidotprecision & b)    throw()
01269 {
01270    return b.reinf==Inf(Re(a)) && b.resup==Sup(Re(a)) && b.iminf==Inf(Im(a)) && b.imsup==Sup(Im(a));
01271 }
01272 
01273 inline bool operator!= (const cidotprecision & a, const cinterval & b)    throw()
01274 {
01275    return a.reinf!=Inf(Re(b)) || a.resup!=Sup(Re(b)) || a.iminf!=Inf(Im(a)) || a.imsup!=Sup(Im(a));
01276 }
01277 
01278 inline bool operator!= (const cinterval & a, const cidotprecision & b)    throw()
01279 {
01280    return b.reinf!=Inf(Re(a)) || b.resup!=Sup(Re(b)) || b.iminf!=Inf(Im(a)) || b.imsup!=Sup(Im(a));
01281 }
01282 
01283 // CID-D
01284 
01285 inline bool operator== (const cidotprecision & a, const dotprecision & b)    throw()
01286 {
01287    return a.reinf==b && a.resup==b && a.iminf==0. && a.imsup==0.;
01288 }
01289 
01290 inline bool operator== (const dotprecision & a, const cidotprecision & b)    throw()
01291 {
01292    return b.reinf==a && b.resup==a && b.iminf==0. && b.imsup==0.;
01293 }
01294 
01295 inline bool operator!= (const cidotprecision & a, const dotprecision & b)    throw()
01296 {
01297    return a.reinf!=b || a.resup!=b || a.iminf!=0. || a.imsup!=0.;
01298 }
01299 
01300 inline bool operator!= (const dotprecision & a, const cidotprecision & b)    throw()
01301 {
01302    return b.reinf!=a || b.resup!=b || b.iminf!=0. || b.imsup!=0.;
01303 }
01304 
01305 
01306 // CID-CD
01307 
01308 inline bool operator== (const cidotprecision & a, const cdotprecision & b)    throw()
01309 {
01310    return a.reinf==Re(b) && a.resup==Re(b) && a.iminf==Im(b) && a.imsup==Im(b);
01311 }
01312 
01313 inline bool operator== (const cdotprecision & a, const cidotprecision & b)    throw()
01314 {
01315    return b.reinf==Re(a) && b.resup==Re(a) && b.iminf==Im(a) && b.imsup==Im(a);
01316 }
01317 
01318 inline bool operator!= (const cidotprecision & a, const cdotprecision & b)    throw()
01319 {
01320    return a.reinf!=Re(b) || a.resup!=Re(b) || a.iminf!=Im(a) || a.imsup!=Im(a);
01321 }
01322 
01323 inline bool operator!= (const cdotprecision & a, const cidotprecision & b)    throw()
01324 {
01325    return b.reinf!=Re(a) || b.resup!=Re(b) || b.iminf!=Im(a) || b.imsup!=Im(a);
01326 }
01327 
01328 // CID-ID
01329 
01330 inline bool operator== (const cidotprecision & a, const idotprecision & b)    throw()
01331 {
01332    return a.reinf==Inf(b) && a.resup==Sup(b) && a.iminf==0. && a.imsup==0.;
01333 }
01334 
01335 inline bool operator== (const idotprecision & a, const cidotprecision & b)    throw()
01336 {
01337    return b.reinf==Inf(a) && b.resup==Sup(a) && b.iminf==0. && b.imsup==0.;
01338 }
01339 
01340 inline bool operator!= (const cidotprecision & a, const idotprecision & b)    throw()
01341 {
01342    return a.reinf!=Inf(b) || a.resup!=Sup(b) || a.iminf!=0. || a.imsup!=0.;
01343 }
01344 
01345 inline bool operator!= (const idotprecision & a, const cidotprecision & b)    throw()
01346 {
01347    return b.reinf!=Inf(a) || b.resup!=Sup(b) || b.iminf!=0. || b.imsup!=0.;
01348 }
01349 
01350 // ---- Set Operators ----
01351 inline bool operator  <(const cidotprecision & a,const cidotprecision & b) throw()
01352 {
01353    return a.reinf>b.reinf && a.resup<b.resup && a.iminf>b.iminf && a.imsup<b.imsup;
01354 }
01355 
01356 inline bool operator  >(const cidotprecision & a,const cidotprecision & b) throw()
01357 {
01358    return a.reinf<b.reinf && a.resup>b.resup && a.iminf<b.iminf && a.imsup>b.imsup;
01359 }
01360 
01361 inline bool operator <=(const cidotprecision & a,const cidotprecision & b) throw()
01362 {
01363    return a.reinf>=b.reinf && a.resup<=b.resup && a.iminf>=b.iminf && a.imsup<=b.imsup;
01364 }
01365 
01366 inline bool operator >=(const cidotprecision & a,const cidotprecision & b) throw()
01367 {
01368    return a.reinf<=b.reinf && a.resup>=b.resup && a.iminf<=b.iminf && a.imsup>=b.imsup;
01369 }
01370 
01371 // CID-R
01372 
01373 inline bool operator  <(const real & a,const cidotprecision & b) throw() { return b>_cinterval(a); }
01374 inline bool operator  >(const real & a,const cidotprecision & b) throw() { return false; }
01375 inline bool operator <=(const real & a,const cidotprecision & b) throw() { return b>=_cinterval(a); }
01376 inline bool operator >=(const real & a,const cidotprecision & b) throw() { return b<=_cinterval(a); }
01377 
01378 inline bool operator  <(const cidotprecision & a,const real & b) throw() { return false; }
01379 inline bool operator  >(const cidotprecision & a,const real & b) throw() { return a>_cinterval(b); }
01380 inline bool operator <=(const cidotprecision & a,const real & b) throw() { return a<=_cinterval(b); }
01381 inline bool operator >=(const cidotprecision & a,const real & b) throw() { return a>=_cinterval(b); }
01382 
01383 // CID-C
01384 
01385 inline bool operator  <(const complex & a,const cidotprecision & b) throw() { return b>_cinterval(a); }
01386 inline bool operator  >(const complex & a,const cidotprecision & b) throw() { return false; }
01387 inline bool operator <=(const complex & a,const cidotprecision & b) throw() { return b>=_cinterval(a); }
01388 inline bool operator >=(const complex & a,const cidotprecision & b) throw() { return b<=_cinterval(a); }
01389 
01390 inline bool operator  <(const cidotprecision & a,const complex & b) throw() { return false; }
01391 inline bool operator  >(const cidotprecision & a,const complex & b) throw() { return a>_cinterval(b); }
01392 inline bool operator <=(const cidotprecision & a,const complex & b) throw() { return a<=_cinterval(b); }
01393 inline bool operator >=(const cidotprecision & a,const complex & b) throw() { return a>=_cinterval(b); }
01394 
01395 // CID-I
01396 
01397 inline bool operator  <(const interval & a,const cidotprecision & b) throw() { return b>_cinterval(a); }
01398 inline bool operator  >(const interval & a,const cidotprecision & b) throw() { return false; }
01399 inline bool operator <=(const interval & a,const cidotprecision & b) throw() { return b>=_cinterval(a); }
01400 inline bool operator >=(const interval & a,const cidotprecision & b) throw() { return b<=_cinterval(a); }
01401 
01402 inline bool operator  <(const cidotprecision & a,const interval & b) throw() { return false; }
01403 inline bool operator  >(const cidotprecision & a,const interval & b) throw() { return a>_cinterval(b); }
01404 inline bool operator <=(const cidotprecision & a,const interval & b) throw() { return a<=_cinterval(b); }
01405 inline bool operator >=(const cidotprecision & a,const interval & b) throw() { return a>=_cinterval(b); }
01406 
01407 // CID-CI
01408 
01409 inline bool operator  <(const cinterval & a,const cidotprecision & b) throw() 
01410 { 
01411    return Inf(Re(a))>b.reinf && Sup(Re(a))<b.resup && Inf(Im(a))>b.iminf && Sup(Im(a))<b.imsup; 
01412 }
01413 
01414 inline bool operator  >(const cinterval & a,const cidotprecision & b) throw() 
01415 { 
01416    return Inf(Re(a))<b.reinf && Sup(Re(a))>b.resup && Inf(Im(a))<b.iminf && Sup(Im(a))>b.imsup; 
01417 }
01418 
01419 inline bool operator <=(const cinterval & a,const cidotprecision & b) throw() 
01420 { 
01421    return Inf(Re(a))>=b.reinf && Sup(Re(a))<=b.resup && Inf(Im(a))>=b.iminf && Sup(Im(a))<=b.imsup; 
01422 }
01423 
01424 inline bool operator >=(const cinterval & a,const cidotprecision & b) throw() 
01425 { 
01426    return Inf(Re(a))<=b.reinf && Sup(Re(a))>=b.resup && Inf(Im(a))<=b.iminf && Sup(Im(a))>=b.imsup; 
01427 }
01428 
01429 inline bool operator  <(const cidotprecision & a,const cinterval & b) throw() 
01430 { 
01431    return Inf(Re(b))<a.reinf && Sup(Re(b))>a.resup && Inf(Im(b))<a.iminf && Sup(Im(b))>a.imsup; 
01432 }
01433 
01434 inline bool operator  >(const cidotprecision & a,const cinterval & b) throw() 
01435 { 
01436    return Inf(Re(b))>a.reinf && Sup(Re(b))<a.resup && Inf(Im(b))>a.iminf && Sup(Im(b))<a.imsup; 
01437 }
01438 
01439 inline bool operator <=(const cidotprecision & a,const cinterval & b) throw() 
01440 {
01441    return Inf(Re(b))<=a.reinf && Sup(Re(b))>=a.resup && Inf(Im(b))<=a.iminf && Sup(Im(b))>=a.imsup; 
01442 }
01443 
01444 inline bool operator >=(const cidotprecision & a,const cinterval & b) throw() 
01445 { 
01446    return Inf(Re(b))>=a.reinf && Sup(Re(b))<=a.resup && Inf(Im(b))>=a.iminf && Sup(Im(b))<=a.imsup; 
01447 }
01448 
01449 // CID-D
01450 
01451 inline bool operator  <(const dotprecision & a,const cidotprecision & b) throw()
01452 {
01453    return a>b.reinf && a<b.resup && 0.>b.iminf && 0.<b.imsup;
01454 }
01455 
01456 inline bool operator  >(const dotprecision & a,const cidotprecision & b) throw()
01457 {
01458    return false;
01459 }
01460 
01461 inline bool operator <=(const dotprecision & a,const cidotprecision & b) throw()
01462 {
01463    return a>=b.reinf && a<=b.resup && 0.>=b.iminf && 0.<=b.imsup;
01464 }
01465 
01466 inline bool operator >=(const dotprecision & a,const cidotprecision & b) throw()
01467 {
01468    return a==b;
01469 }
01470 
01471 inline bool operator  <(const cidotprecision & a,const dotprecision & b) throw()
01472 {
01473    return false;
01474 }
01475 
01476 inline bool operator  >(const cidotprecision & a,const dotprecision & b) throw()
01477 {
01478    return b>a.reinf && b<a.resup && 0.>a.iminf && 0.<a.imsup;
01479 }
01480 
01481 inline bool operator <=(const cidotprecision & a,const dotprecision & b) throw()
01482 {
01483    return a==b;
01484 }
01485 
01486 inline bool operator >=(const cidotprecision & a,const dotprecision & b) throw()
01487 {
01488    return b>=a.reinf && b<=a.resup && 0.>=a.iminf && 0.<=a.imsup;
01489 }
01490 
01491 
01492 // CID-CD
01493 
01494 inline bool operator  <(const cdotprecision & a,const cidotprecision & b) throw()
01495 {
01496    return Re(a)>b.reinf && Re(a)<b.resup && Im(a)>b.iminf && Im(a)<b.imsup;
01497 }
01498 
01499 inline bool operator  >(const cdotprecision & a,const cidotprecision & b) throw()
01500 {
01501    return false;
01502 }
01503 
01504 inline bool operator <=(const cdotprecision & a,const cidotprecision & b) throw()
01505 {
01506    return Re(a)>=b.reinf && Re(a)<=b.resup && Im(a)>=b.iminf && Im(a)<=b.imsup;
01507 }
01508 
01509 inline bool operator >=(const cdotprecision & a,const cidotprecision & b) throw()
01510 {
01511    return a==b;
01512 }
01513 
01514 inline bool operator  <(const cidotprecision & a,const cdotprecision & b) throw()
01515 {
01516    return false;
01517 }
01518 
01519 inline bool operator  >(const cidotprecision & a,const cdotprecision & b) throw()
01520 {
01521    return Re(b)>a.reinf && Re(b)<a.resup && Im(b)>a.iminf && Im(b)<a.imsup;
01522 }
01523 
01524 inline bool operator <=(const cidotprecision & a,const cdotprecision & b) throw()
01525 {
01526    return a==b;
01527 }
01528 
01529 inline bool operator >=(const cidotprecision & a,const cdotprecision & b) throw()
01530 {
01531    return Re(b)>=a.reinf && Re(b)<=a.resup && Im(a)>=a.iminf && Im(a)<=a.imsup;
01532 }
01533 
01534 // CID-ID
01535 
01536 inline bool operator  <(const idotprecision & a,const cidotprecision & b) throw()
01537 {
01538    return Inf(a)>b.reinf && Sup(a)<b.resup && 0.>b.iminf && 0.<b.imsup;
01539 }
01540 
01541 inline bool operator  >(const idotprecision & a,const cidotprecision & b) throw()
01542 {
01543    return false;
01544 }
01545 
01546 inline bool operator <=(const idotprecision & a,const cidotprecision & b) throw()
01547 {
01548    return Inf(a)>=b.reinf && Sup(a)<=b.resup && 0.>=b.iminf && 0.<=b.imsup;
01549 }
01550 
01551 inline bool operator >=(const idotprecision & a,const cidotprecision & b) throw()
01552 {
01553    return Inf(a)<=b.reinf && Sup(a)>=b.resup && b.iminf==0. && b.imsup==0.;
01554 }
01555 
01556 inline bool operator  <(const cidotprecision & a,const idotprecision & b) throw()
01557 {
01558    return false;
01559 }
01560 
01561 inline bool operator  >(const cidotprecision & a,const idotprecision & b) throw()
01562 {
01563    return Inf(b)>a.reinf && Sup(b)<a.resup && 0.>a.iminf && 0.<a.imsup;
01564 }
01565 
01566 inline bool operator <=(const cidotprecision & a,const idotprecision & b) throw()
01567 {
01568    return Inf(b)<=a.reinf && Sup(b)>=a.resup && a.iminf==0. && a.imsup==0.;
01569 }
01570 
01571 inline bool operator >=(const cidotprecision & a,const idotprecision & b) throw()
01572 {
01573    return Inf(b)>=a.reinf && Sup(b)<=a.resup && 0.>=a.iminf && 0.<=a.imsup;
01574 }
01575 
01576 // ---- Funktionen    ----
01577 
01578 cdotprecision   Inf(const cidotprecision & a) throw() { return cdotprecision(a.reinf,a.iminf); }
01579 cdotprecision   Sup(const cidotprecision & a) throw() { return cdotprecision(a.resup,a.imsup); }
01580 
01581 cidotprecision & SetInf(cidotprecision & a, const cdotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
01582 {
01583    a.reinf=Re(b);
01584    a.iminf=Im(b);
01585    
01586    if (a.reinf >a.resup || a.iminf > a.imsup) 
01587       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision & SetInf(cidotprecision & a,const cdotprecision & b)"));
01588 
01589    return a;
01590 }
01591 
01592 cidotprecision & SetSup(cidotprecision & a, const cdotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
01593 {
01594    a.resup=Re(b);
01595    a.imsup=Im(b);
01596    
01597    if (a.reinf >a.resup || a.iminf > a.imsup) 
01598       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision & SetSup(cidotprecision & a,const cdotprecision & b)"));
01599 
01600    return a;
01601 }
01602 
01603 cidotprecision & SetInf(cidotprecision & a, const dotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
01604 {
01605    a.reinf=b;
01606    a.iminf=b;
01607    
01608    if (a.reinf >a.resup || a.iminf > a.imsup) 
01609       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision & SetInf(cidotprecision & a,const dotprecision & b)"));
01610 
01611    return a;
01612 }
01613 
01614 cidotprecision & SetSup(cidotprecision & a, const dotprecision & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
01615 {
01616    a.resup=b;
01617    a.imsup=b;
01618    
01619    if (a.reinf >a.resup || a.iminf > a.imsup) 
01620       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision & SetInf(cidotprecision & a,const dotprecision & b)"));
01621 
01622    return a;
01623 }
01624 
01625 cidotprecision & SetInf(cidotprecision & a, const complex & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
01626 {
01627    a.reinf=Re(b);
01628    a.iminf=Im(b);
01629    
01630    if (a.reinf >a.resup || a.iminf > a.imsup) 
01631       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision & SetInf(cidotprecision & a,const complex & b)"));
01632 
01633    return a;
01634 }
01635 
01636 cidotprecision & SetSup(cidotprecision & a, const complex & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
01637 {
01638    a.resup=Re(b);
01639    a.imsup=Im(b);
01640    
01641    if (a.reinf >a.resup || a.iminf > a.imsup) 
01642       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision & SetSup(cidotprecision & a,const complex & b)"));
01643 
01644    return a;
01645 }
01646 
01647 cidotprecision & SetInf(cidotprecision & a, const real & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
01648 {
01649    a.reinf=b;
01650    a.iminf=b;
01651    
01652    if (a.reinf >a.resup || a.iminf > a.imsup) 
01653       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision & SetInf(cidotprecision & a,const real & b)"));
01654 
01655    return a;
01656 }
01657 
01658 cidotprecision & SetSup(cidotprecision & a, const real & b) throw(ERROR_CIDOTPRECISION_EMPTY_INTERVAL)
01659 {
01660    a.resup=b;
01661    a.imsup=b;
01662    
01663    if (a.reinf >a.resup || a.iminf > a.imsup) 
01664       cxscthrow(ERROR_CIDOTPRECISION_EMPTY_INTERVAL("inline cidotprecision & SetInf(cidotprecision & a,const real & b)"));
01665 
01666    return a;
01667 }
01668 
01669 cidotprecision & UncheckedSetInf(cidotprecision & a, const cdotprecision & b) throw()
01670 {
01671    a.reinf=Re(b);
01672    a.iminf=Im(b);
01673    return a;
01674 }
01675 
01676 cidotprecision & UncheckedSetSup(cidotprecision & a, const cdotprecision & b) throw()
01677 {
01678    a.resup=Re(b);
01679    a.imsup=Im(b);
01680    return a;
01681 }
01682 
01683 cidotprecision & UncheckedSetInf(cidotprecision & a, const dotprecision & b) throw()
01684 {
01685    a.reinf=b;
01686    a.iminf=b;
01687    return a;
01688 }
01689 
01690 cidotprecision & UncheckedSetSup(cidotprecision & a, const dotprecision & b) throw()
01691 {
01692    a.resup=b;
01693    a.imsup=b;
01694    return a;
01695 }
01696 
01697 cidotprecision & UncheckedSetInf(cidotprecision & a, const complex & b) throw()
01698 {
01699    a.reinf=Re(b);
01700    a.iminf=Im(b);
01701    return a;
01702 }
01703 
01704 cidotprecision & UncheckedSetSup(cidotprecision & a, const complex & b) throw()
01705 {
01706    a.resup=Re(b);
01707    a.imsup=Im(b);
01708    return a;
01709 }
01710 
01711 cidotprecision & UncheckedSetInf(cidotprecision & a, const real & b) throw()
01712 {
01713    a.reinf=b;
01714    a.iminf=b;
01715    return a;
01716 }
01717 
01718 cidotprecision & UncheckedSetSup(cidotprecision & a, const real & b) throw()
01719 {
01720    a.resup=b;
01721    a.imsup=b;
01722    return a;
01723 }
01724 
01725 idotprecision    Re(const cidotprecision & a) throw() { return idotprecision(a.reinf,a.resup); }
01726 idotprecision    Im(const cidotprecision & a) throw() { return idotprecision(a.iminf,a.imsup); }
01727 
01728 inline const dotprecision & InfRe(const cidotprecision & a) throw() { return a.reinf; }
01729 inline const dotprecision & InfIm(const cidotprecision & a) throw() { return a.iminf; }
01730 inline const dotprecision & SupRe(const cidotprecision & a) throw() { return a.resup; }
01731 inline const dotprecision & SupIm(const cidotprecision & a) throw() { return a.imsup; } 
01732       
01733 inline       dotprecision & InfRe(cidotprecision & a) throw() { return a.reinf; }
01734 inline       dotprecision & InfIm(cidotprecision & a) throw() { return a.iminf; } 
01735 inline       dotprecision & SupRe(cidotprecision & a) throw() { return a.resup; } 
01736 inline       dotprecision & SupIm(cidotprecision & a) throw() { return a.imsup; }
01737 
01738 cidotprecision & SetRe(cidotprecision & a, const idotprecision & b) throw()
01739 {
01740    a.reinf=Inf(b);
01741    a.resup=Sup(b);
01742    return a;
01743 }
01744 
01745 cidotprecision & SetIm(cidotprecision & a, const idotprecision & b) throw()
01746 {
01747    a.iminf=Inf(b);
01748    a.imsup=Sup(b);
01749    return a;
01750 }
01751 
01752 cidotprecision & SetRe(cidotprecision & a, const dotprecision & b) throw()
01753 {
01754    a.reinf=b;
01755    a.resup=b;
01756    return a;
01757 }
01758 
01759 cidotprecision & SetIm(cidotprecision & a, const dotprecision & b) throw()
01760 {
01761    a.iminf=b;
01762    a.imsup=b;
01763    return a;
01764 }
01765 
01766 cidotprecision & SetRe(cidotprecision & a, const interval & b) throw()
01767 {
01768    a.reinf=Inf(b);
01769    a.resup=Sup(b);
01770    return a;
01771 }
01772 
01773 cidotprecision & SetIm(cidotprecision & a, const interval & b) throw()
01774 {
01775    a.iminf=Inf(b);
01776    a.imsup=Sup(b);
01777    return a;
01778 }
01779 
01780 cidotprecision & SetRe(cidotprecision & a, const real & b) throw()
01781 {
01782    a.reinf=b;
01783    a.resup=b;
01784    return a;
01785 }
01786 
01787 cidotprecision & SetIm(cidotprecision & a, const real & b) throw()   
01788 {
01789    a.iminf=b;
01790    a.imsup=b;
01791    return a;
01792 }
01793 
01794 void rnd(const cidotprecision & a,cinterval & b) throw()
01795 {
01796    complex c;
01797    SetRe(c,rnd(a.reinf,RND_DOWN));
01798    SetIm(c,rnd(a.iminf,RND_DOWN));
01799    UncheckedSetInf(b,c);
01800    SetRe(c,rnd(a.resup,RND_UP));
01801    SetIm(c,rnd(a.imsup,RND_UP));
01802    UncheckedSetSup(b,c);
01803 }
01804 
01805 cinterval rnd(const cidotprecision & a) throw()
01806 {
01807    cinterval tmp;
01808    rnd(a,tmp);
01809    return tmp;
01810 }
01811 
01812 inline void accumulate  (cidotprecision & a, const cinterval & b, const interval & c) throw()
01813 {
01814    accumulate(a,b,cinterval(c));
01815 }
01816 
01817 inline void accumulate  (cidotprecision & a, const cinterval & b, const complex & c) throw()
01818 {
01819    accumulate(a,b,cinterval(c));
01820 }
01821 
01822 inline void accumulate  (cidotprecision & a, const cinterval & b, const real & c) throw()
01823 {
01824    accumulate(a,b,cinterval(c));
01825 }
01826 
01827 inline void accumulate  (cidotprecision & a, const interval & b,const cinterval & c) throw()
01828 {
01829    accumulate(a,cinterval(b),c);
01830 }
01831 
01832 inline void accumulate  (cidotprecision & a, const complex & b,const cinterval & c) throw()
01833 {
01834    accumulate(a,cinterval(b),c);
01835 }
01836 
01837 inline void accumulate  (cidotprecision & a, const real & b,const cinterval & c) throw()
01838 {
01839    accumulate(a,cinterval(b),c);
01840 }
01841 
01842 inline void accumulate  (cidotprecision & a, const complex & b,const interval & c) throw()
01843 {
01844    accumulate(a,cinterval(b),cinterval(c));
01845 }
01846 
01847 inline void accumulate  (cidotprecision & a, const interval & b,const complex & c) throw()
01848 {
01849    accumulate(a,cinterval(b),cinterval(c));
01850 }
01851 
01852 inline void accumulate  (cidotprecision & a, const interval & b,const interval & c) throw()
01853 {
01854    accumulate(a,cinterval(b),cinterval(c));
01855 }
01856 
01857 inline void accumulate  (cidotprecision & a, const interval & b,const real & c) throw()
01858 {
01859    accumulate(a,cinterval(b),cinterval(c));
01860 }
01861 
01862 inline void accumulate  (cidotprecision & a, const real & b,const interval & c) throw()
01863 {
01864    accumulate(a,cinterval(b),cinterval(c));
01865 }
01866 
01867 inline void accumulate  (cidotprecision & a, const complex & b,const complex & c) throw()
01868 {
01869    accumulate(a,cinterval(b),cinterval(c));
01870 }
01871 
01872 inline void accumulate  (cidotprecision & a, const real & b,const complex & c) throw()
01873 {
01874    accumulate(a,cinterval(b),cinterval(c));
01875 }
01876 
01877 inline void accumulate  (cidotprecision & a, const complex & b,const real & c) throw()
01878 {
01879    accumulate(a,cinterval(b),cinterval(c));
01880 }
01881 
01882 inline void accumulate  (cidotprecision & a, const real & b,const real & c) throw()
01883 {
01884    accumulate(a,cinterval(b),cinterval(c));
01885 }
01886 
01887 } // namespace cxsc
01888