C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
l_cinterval.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: l_cinterval.inl,v 1.14 2014/01/30 17:23:46 cxsc Exp $ */
00025 
00026 namespace cxsc {
00027 
00028 
00029 // Inlined functions for l_cinterval.
00030 
00031 // ---- implicit constructors  ------------------------------
00032       
00033 inline l_cinterval::l_cinterval(const interval & a,const interval & b) throw()
00034       : re(a), im(b)
00035 {
00036 }
00037 
00038 inline l_cinterval::l_cinterval(const l_interval & a, 
00039                                 const l_interval & b) throw()
00040       : re(a), im(b)
00041 {
00042 }
00043 
00044 inline l_cinterval::l_cinterval(const complex & a, const complex & b)  
00045                                       throw(ERROR_CINTERVAL_EMPTY_INTERVAL)
00046    : re(Re(a),Re(b)),
00047      im(Im(a),Im(b))
00048 {
00049    if(Inf(re)>Sup(re) || Inf(im)>Sup(im))
00050       cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL("l_cinterval::l_cinterval(const complex & a,const complex & b)"));
00051 }
00052 
00053 inline l_cinterval::l_cinterval(const l_complex & a, const l_complex & b)  
00054                                       throw(ERROR_CINTERVAL_EMPTY_INTERVAL)
00055    : re(Re(a),Re(b)),
00056      im(Im(a),Im(b))
00057 {
00058    if(Inf(re)>Sup(re) || Inf(im)>Sup(im))
00059       cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL("l_cinterval::l_cinterval(const complex & a,const complex & b)"));
00060 }
00061 
00062 // ---- explicit constructors  ------------------------------
00063 
00064 inline l_cinterval::l_cinterval(const real & a) throw() : re(a,a), im(0,0) {}
00065 inline l_cinterval::l_cinterval(const l_real & a) throw() : re(a,a), im(0,0) {}
00066 
00067 
00068 inline l_cinterval::l_cinterval(const interval & a) 
00069                                throw() : re(a), im(0,0) {}
00070 inline l_cinterval::l_cinterval(const l_interval & a) 
00071                                throw() : re(a), im(0,0) {}
00072 inline l_cinterval::l_cinterval(const complex & a) 
00073                            throw() : re(Re(a),Re(a)),im(Im(a),Im(a)) {}
00074 inline l_cinterval::l_cinterval(const l_complex & a) 
00075                            throw() : re(Re(a),Re(a)),im(Im(a),Im(a)) {} 
00076 inline l_cinterval::l_cinterval(const cinterval & a) 
00077        throw() : re(Inf(Re(a)),Sup(Re(a))),im(Inf(Im(a)),Sup(Im(a))) {} 
00078 
00079      
00080 // ---- assignments -----------------------------------------
00081 
00082 inline l_cinterval & l_cinterval::operator =(const real & a) throw()
00083 {
00084    re=a,im=0.0;
00085    return *this;   
00086 }
00087 
00088 inline l_cinterval & l_cinterval::operator =(const l_real & a) throw()
00089 {
00090    re=a,im=0.0;
00091    return *this;   
00092 }
00093 
00094 
00095 inline l_cinterval & l_cinterval::operator =(const interval & a) throw()
00096 {
00097    re=a,im=0.0;
00098    return *this;
00099 }
00100 
00101 inline l_cinterval & l_cinterval::operator =(const l_interval & a) throw()
00102 {
00103    re=a,im=0.0;
00104    return *this;
00105 }
00106 
00107 inline l_cinterval & l_cinterval::operator =(const complex & a) throw()
00108 {
00109    re=Re(a),im=Im(a);
00110    return *this;
00111 }
00112 
00113 inline l_cinterval & l_cinterval::operator =(const l_complex & a) throw()
00114 {
00115    re=Re(a),im=Im(a);
00116    return *this;
00117 }
00118 
00119 inline l_cinterval & l_cinterval::operator =(const cinterval & a) throw()
00120 {
00121      re = Re(a);        
00122      im = Im(a);        
00123      return *this;
00124 }
00125 
00126 inline l_cinterval & l_cinterval::operator =(const l_cinterval & a) throw()
00127 {
00128      re = a.re; 
00129      im = a.im; 
00130      return *this;
00131 }
00132  
00133 inline l_cinterval & l_cinterval::operator =(const dotprecision & a) throw()
00134 {
00135    return *this = l_cinterval(a);
00136 }
00137 
00138 inline l_cinterval & l_cinterval::operator =(const idotprecision & a) throw()
00139 {
00140    return *this = l_cinterval(a);
00141 }
00142 
00143 inline l_cinterval & l_cinterval::operator =(const cdotprecision & a) throw()
00144 {
00145    return *this = l_cinterval(a);
00146 }
00147 
00148 inline l_cinterval & l_cinterval::operator =(const cidotprecision & a) throw()
00149 {
00150    return *this = l_cinterval(a);
00151 }
00152 
00153 
00154 // ---- Std.Operators ---------------------------------------
00155 
00156 inline l_cinterval operator -(const l_cinterval & a) throw ()
00157 {
00158    return l_cinterval(-a.re,-a.im);
00159 }
00160 
00161 inline l_cinterval operator +(const l_cinterval & a) throw ()
00162 {
00163    return a;
00164 }
00165 
00166 inline bool operator! (const l_cinterval & a)  throw()
00167 {
00168    return !a.re && !a.im;
00169 }
00170 
00171 inline l_cinterval operator +(const l_cinterval & a, 
00172                               const l_cinterval & b) throw()
00173 {
00174    return l_cinterval(a.re + b.re, a.im + b.im);
00175 }
00176 
00177 inline l_cinterval operator -(const l_cinterval & a, 
00178                               const l_cinterval & b) throw()
00179 {
00180    return l_cinterval(a.re - b.re, a.im - b.im);
00181 }
00182 
00183 inline l_cinterval operator &(const l_cinterval & a, const l_cinterval & b) 
00184                                       throw(ERROR_CINTERVAL_EMPTY_INTERVAL)
00185 {
00186    l_cinterval tmp = a;
00187    l_real x,y;
00188    y = Inf(a.re);   x = Inf(b.re);
00189    if (x>y) y = x;  // y = max(Inf(a.re), Inf(b.re))
00190    SetInf(tmp.re, y);
00191    y = Inf(a.im);   x = Inf(b.im);
00192    if (x>y) y = x;  // y = max(Inf(a.im), Inf(b.im))
00193    SetInf(tmp.im, y);
00194    y = Sup(a.re);   x = Sup(b.re);
00195    if (x<y) y = x;  // y = min(Sup(a.re), Sup(b.re)) 
00196    SetSup(tmp.re, y);
00197    y = Sup(a.im);   x = Sup(b.im);
00198    if (x<y) y = x;  // y = min(Sup(a.im), Sup(b.im))
00199    SetSup(tmp.im, y);
00200    if (Inf(tmp.re) > Sup(tmp.re) || Inf(tmp.im) > Sup(tmp.im)) 
00201       cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL("inline l_cinterval operator &(const l_cinterval & a,const l_cinterval & b)"));
00202   return tmp;
00203 }
00204 
00205 inline l_cinterval operator |(const l_cinterval & a, const l_cinterval & b) 
00206                                                                     throw()
00207 {
00208    l_cinterval tmp = a;
00209    l_real x,y;
00210    y = Inf(a.re);   x = Inf(b.re);
00211    if (x<y) y = x; // y = min(Inf(a.re), Inf(b.re))
00212    SetInf(tmp.re, y);
00213    y = Inf(a.im);   x = Inf(b.im);
00214    if (x<y) y = x; // y = min(Inf(a.im), Inf(b.im))
00215    SetInf(tmp.im, y);
00216    y = Sup(a.re);   x = Sup(b.re);
00217    if (x>y) y = x; // y = max(Sup(a.re), Sup(b.re)) 
00218    SetSup(tmp.re, y);
00219    y = Sup(a.im);   x = Sup(b.im);
00220    if (x>y) y = x; // y = max(Sup(a.im), Sup(b.im))
00221    SetSup(tmp.im, y);
00222    return tmp;
00223 }
00224 
00225 inline l_cinterval & operator +=(l_cinterval & a, const l_cinterval & b) 
00226                                              throw() { return a = a+b; }
00227 inline l_cinterval & operator -=(l_cinterval & a, const l_cinterval & b) 
00228                                              throw() { return a = a-b; }
00229 inline l_cinterval & operator *=(l_cinterval & a, const l_cinterval & b) 
00230                                              throw() { return a = a*b; }
00231 inline l_cinterval & operator /=(l_cinterval & a, const l_cinterval & b) 
00232                                              throw() { return a = a/b; }
00233 inline l_cinterval & operator |=(l_cinterval & a, const l_cinterval & b) 
00234                                              throw() { return a = a|b; }
00235 inline l_cinterval & operator &=(l_cinterval & a, const l_cinterval & b) 
00236                throw(ERROR_CINTERVAL_EMPTY_INTERVAL) { return a = a&b; }
00237 
00238 // LCI <--> R
00239 
00240 inline l_cinterval operator +(const l_cinterval & a, const real & b) throw() 
00241                                               { return a + l_cinterval(b); }
00242 inline l_cinterval operator +(const real & a, const l_cinterval & b) throw() 
00243                                               { return l_cinterval(a) + b; }
00244 inline l_cinterval operator -(const l_cinterval & a, const real & b) throw() 
00245                                               { return a - l_cinterval(b); }
00246 inline l_cinterval operator -(const real & a, const l_cinterval & b) throw() 
00247                                               { return l_cinterval(a) - b; }
00248 inline l_cinterval operator *(const l_cinterval & a, const real & b) throw() 
00249                                      { return l_cinterval(a.re*b, a.im*b); }
00250 inline l_cinterval operator *(const real & a, const l_cinterval & b) throw()
00251                                      { return l_cinterval(b.re*a, b.im*a); }
00252 inline l_cinterval operator /(const l_cinterval & a, const real & b) throw()
00253                                      { return l_cinterval(a.re/b, a.im/b); }
00254 inline l_cinterval operator /(const real & a, const l_cinterval & b) throw() 
00255                                               { return l_cinterval(a) / b; }
00256 inline l_cinterval operator |(const l_cinterval & a, const real & b) throw() 
00257                                                 { return a|l_cinterval(b); }
00258 inline l_cinterval operator |(const real & a, const l_cinterval & b) throw() 
00259                                                 { return l_cinterval(a)|b; }
00260 inline l_cinterval operator &(const l_cinterval & a, const real & b) throw() 
00261                                               { return a & l_cinterval(b); }
00262 inline l_cinterval operator &(const real & a, const l_cinterval & b) throw() 
00263                                               { return l_cinterval(a) & b; }
00264 
00265 inline l_cinterval & operator +=(l_cinterval & a, const real & b) throw() 
00266                                             { return a = a+l_cinterval(b); }
00267 inline l_cinterval & operator -=(l_cinterval & a, const real & b) throw() 
00268                                            { return a = a -l_cinterval(b); }
00269 inline l_cinterval & operator *=(l_cinterval & a, const real & b) throw()
00270                                                        { return a = a * b; }
00271 inline l_cinterval & operator /=(l_cinterval & a, const real & b) throw()
00272                                                        { return a = a / b; }
00273 inline l_cinterval & operator |=(l_cinterval & a, const real & b) throw() 
00274                                             { return a = a|l_cinterval(b); }
00275 inline l_cinterval & operator &=(l_cinterval & a, const real & b) throw() 
00276                                             { return a = a&l_cinterval(b); }
00277 
00278 // LCI <--> LR
00279 
00280 inline l_cinterval operator +(const l_cinterval & a, const l_real & b) throw() 
00281                                               { return a + l_cinterval(b); }
00282 inline l_cinterval operator +(const l_real & a, const l_cinterval & b) throw() 
00283                                               { return l_cinterval(a) + b; }
00284 inline l_cinterval operator -(const l_cinterval & a, const l_real & b) throw() 
00285                                               { return a - l_cinterval(b); }
00286 inline l_cinterval operator -(const l_real & a, const l_cinterval & b) throw() 
00287                                               { return l_cinterval(a) - b; }
00288 inline l_cinterval operator *(const l_cinterval & a, const l_real & b) throw() 
00289                                      { return l_cinterval(a.re*b, a.im*b); }
00290 inline l_cinterval operator *(const l_real & a, const l_cinterval & b) throw()
00291                                      { return l_cinterval(b.re*a, b.im*a); }
00292 inline l_cinterval operator /(const l_cinterval & a, const l_real & b) throw()
00293                                      { return l_cinterval(a.re/b, a.im/b); }
00294 inline l_cinterval operator /(const l_real & a, const l_cinterval & b) throw() 
00295                                               { return l_cinterval(a) / b; }
00296 inline l_cinterval operator |(const l_cinterval & a, const l_real & b) throw() 
00297                                                 { return a|l_cinterval(b); }
00298 inline l_cinterval operator |(const l_real & a, const l_cinterval & b) throw() 
00299                                                 { return l_cinterval(a)|b; }
00300 inline l_cinterval operator &(const l_cinterval & a, const l_real & b) throw() 
00301                                               { return a & l_cinterval(b); }
00302 inline l_cinterval operator &(const l_real & a, const l_cinterval & b) throw() 
00303                                               { return l_cinterval(a) & b; }
00304 
00305 inline l_cinterval & operator +=(l_cinterval & a, const l_real & b) throw() 
00306                                             { return a = a+l_cinterval(b); }
00307 inline l_cinterval & operator -=(l_cinterval & a, const l_real & b) throw() 
00308                                            { return a = a -l_cinterval(b); }
00309 inline l_cinterval & operator *=(l_cinterval & a, const l_real & b) throw()
00310                                                        { return a = a * b; }
00311 inline l_cinterval & operator /=(l_cinterval & a, const l_real & b) throw()
00312                                                        { return a = a / b; }
00313 inline l_cinterval & operator |=(l_cinterval & a, const l_real & b) throw() 
00314                                             { return a = a|l_cinterval(b); }
00315 inline l_cinterval & operator &=(l_cinterval & a, const l_real & b) throw() 
00316                                             { return a = a&l_cinterval(b); }
00317 
00318 
00319 
00320 // LCI <--> C
00321 
00322 inline l_cinterval operator +(const l_cinterval & a, const complex & b) 
00323                                       throw() { return a + l_cinterval(b); }
00324 inline l_cinterval operator +(const complex & a, const l_cinterval & b) 
00325                                       throw() { return l_cinterval(a) + b; }
00326 inline l_cinterval operator -(const l_cinterval & a, const complex & b) 
00327                                       throw() { return a - l_cinterval(b); }
00328 inline l_cinterval operator -(const complex & a, const l_cinterval & b) 
00329                                       throw() { return l_cinterval(a) - b; }
00330 inline l_cinterval operator *(const l_cinterval & a, const complex & b) 
00331                                       throw() { return a * l_cinterval(b); }
00332 inline l_cinterval operator *(const complex & a, const l_cinterval & b) 
00333                                       throw() { return l_cinterval(a) * b; }
00334 inline l_cinterval operator /(const l_cinterval & a, const complex & b) 
00335                                       throw() { return a / l_cinterval(b); }
00336 inline l_cinterval operator /(const complex & a, const l_cinterval & b) 
00337                                       throw() { return l_cinterval(a) / b; }
00338 inline l_cinterval operator |(const l_cinterval & a, const complex & b) 
00339                                       throw() { return a | l_cinterval(b); }
00340 inline l_cinterval operator |(const complex & a, const l_cinterval & b) 
00341                                       throw() { return l_cinterval(a) | b; }
00342 inline l_cinterval operator &(const l_cinterval & a, const complex & b) 
00343                                       throw() { return a & l_cinterval(b); }
00344 inline l_cinterval operator &(const complex & a, const l_cinterval & b) 
00345                                       throw() { return l_cinterval(a) & b; }
00346 
00347 inline l_cinterval & operator +=(l_cinterval & a, const complex & b) throw() 
00348                                           { return a = a + l_cinterval(b); }
00349 inline l_cinterval & operator -=(l_cinterval & a, const complex & b) throw() 
00350                                           { return a = a - l_cinterval(b); }
00351 inline l_cinterval & operator *=(l_cinterval & a, const complex & b) throw() 
00352                                           { return a = a * l_cinterval(b); }
00353 inline l_cinterval & operator /=(l_cinterval & a, const complex & b) throw() 
00354                                           { return a = a / l_cinterval(b); }
00355 inline l_cinterval & operator |=(l_cinterval & a, const complex & b) throw() 
00356                                           { return a = a | l_cinterval(b); }
00357 inline l_cinterval & operator &=(l_cinterval & a, const complex & b) throw() 
00358                                           { return a = a & l_cinterval(b); }
00359 
00360 
00361 // LCI <--> LC
00362 
00363 inline l_cinterval operator +(const l_cinterval & a, const l_complex & b) 
00364                                       throw() { return a + l_cinterval(b); }
00365 inline l_cinterval operator +(const l_complex & a, const l_cinterval & b) 
00366                                       throw() { return l_cinterval(a) + b; }
00367 inline l_cinterval operator -(const l_cinterval & a, const l_complex & b) 
00368                                       throw() { return a - l_cinterval(b); }
00369 inline l_cinterval operator -(const l_complex & a, const l_cinterval & b) 
00370                                       throw() { return l_cinterval(a) - b; }
00371 inline l_cinterval operator *(const l_cinterval & a, const l_complex & b) 
00372                                       throw() { return a * l_cinterval(b); }
00373 inline l_cinterval operator *(const l_complex & a, const l_cinterval & b) 
00374                                       throw() { return l_cinterval(a) * b; }
00375 inline l_cinterval operator /(const l_cinterval & a, const l_complex & b) 
00376                                       throw() { return a / l_cinterval(b); }
00377 inline l_cinterval operator /(const l_complex & a, const l_cinterval & b) 
00378                                       throw() { return l_cinterval(a) / b; }
00379 inline l_cinterval operator |(const l_cinterval & a, const l_complex & b) 
00380                                       throw() { return a | l_cinterval(b); }
00381 inline l_cinterval operator |(const l_complex & a, const l_cinterval & b) 
00382                                       throw() { return l_cinterval(a) | b; }
00383 inline l_cinterval operator &(const l_cinterval & a, const l_complex & b) 
00384                                       throw() { return a & l_cinterval(b); }
00385 inline l_cinterval operator &(const l_complex & a, const l_cinterval & b) 
00386                                       throw() { return l_cinterval(a) & b; }
00387 
00388 inline l_cinterval & operator +=(l_cinterval & a, const l_complex & b) throw() 
00389                                           { return a = a + l_cinterval(b); }
00390 inline l_cinterval & operator -=(l_cinterval & a, const l_complex & b) throw() 
00391                                           { return a = a - l_cinterval(b); }
00392 inline l_cinterval & operator *=(l_cinterval & a, const l_complex & b) throw() 
00393                                           { return a = a * l_cinterval(b); }
00394 inline l_cinterval & operator /=(l_cinterval & a, const l_complex & b) throw() 
00395                                           { return a = a / l_cinterval(b); }
00396 inline l_cinterval & operator |=(l_cinterval & a, const l_complex & b) throw() 
00397                                           { return a = a | l_cinterval(b); }
00398 inline l_cinterval & operator &=(l_cinterval & a, const l_complex & b) throw() 
00399                                           { return a = a & l_cinterval(b); }
00400 
00401 
00402 
00403 // LCI <--> I
00404 
00405 inline l_cinterval operator +(const l_cinterval & a, 
00406                               const interval & b) throw()
00407                                             { return a + l_cinterval(b); } 
00408 inline l_cinterval operator +(const interval & a,
00409                               const l_cinterval & b) throw() 
00410                                             { return l_cinterval(a) + b; }
00411 inline l_cinterval operator -(const l_cinterval & a,
00412                               const interval & b) throw() 
00413                                             { return a - l_cinterval(b); }
00414 inline l_cinterval operator -(const interval & a,
00415                               const l_cinterval & b) throw() 
00416                                             { return l_cinterval(a) - b; }
00417 inline l_cinterval operator *(const l_cinterval & a,
00418                               const interval & b) throw()
00419                                    { return l_cinterval(a.re*b, a.im*b); }
00420 inline l_cinterval operator *(const interval & a,
00421                               const l_cinterval & b) throw()
00422                                    { return l_cinterval(b.re*a, b.im*a); }
00423 inline l_cinterval operator /(const l_cinterval & a,
00424                               const interval & b) throw()
00425                                    { return l_cinterval(a.re/b, a.im/b); }
00426 inline l_cinterval operator /(const interval & a,
00427                               const l_cinterval & b) throw() 
00428                                             { return l_cinterval(a) / b; }
00429 inline l_cinterval operator |(const l_cinterval & a,
00430                               const interval & b) throw() 
00431                                             { return a | l_cinterval(b); }
00432 inline l_cinterval operator |(const interval & a,
00433                               const l_cinterval & b) throw() 
00434                                             { return l_cinterval(a) | b; }
00435 inline l_cinterval operator &(const l_cinterval & a,
00436                               const interval & b) throw() 
00437                                             { return a & l_cinterval(b); }
00438 inline l_cinterval operator &(const interval & a,
00439                               const l_cinterval & b) throw() 
00440                                             { return l_cinterval(a) & b; }
00441 
00442 inline l_cinterval & operator +=(l_cinterval & a, const interval & b) 
00443                                 throw() { return a = a + l_cinterval(b); }
00444 inline l_cinterval & operator -=(l_cinterval & a, const interval & b) 
00445                                 throw() { return a = a - l_cinterval(b); }
00446 inline l_cinterval & operator *=(l_cinterval & a, const interval & b) 
00447                                 throw() { return a = a * l_cinterval(b); }
00448 inline l_cinterval & operator /=(l_cinterval & a, const interval & b) 
00449                                 throw() { return a = a / l_cinterval(b); }
00450 inline l_cinterval & operator |=(l_cinterval & a, const interval & b) 
00451                                 throw() { return a = a | l_cinterval(b); }
00452 inline l_cinterval & operator &=(l_cinterval & a, const interval & b) 
00453                                 throw() { return a = a & l_cinterval(b); }
00454 
00455 // LCI <--> LI
00456 
00457 inline l_cinterval operator +(const l_cinterval & a, 
00458                               const l_interval & b) throw()
00459                                             { return a + l_cinterval(b); } 
00460 inline l_cinterval operator +(const l_interval & a,
00461                               const l_cinterval & b) throw() 
00462                                             { return l_cinterval(a) + b; }
00463 inline l_cinterval operator -(const l_cinterval & a,
00464                               const l_interval & b) throw() 
00465                                             { return a - l_cinterval(b); }
00466 inline l_cinterval operator -(const l_interval & a,
00467                               const l_cinterval & b) throw() 
00468                                             { return l_cinterval(a) - b; }
00469 inline l_cinterval operator *(const l_cinterval & a,
00470                               const l_interval & b) throw()
00471                                    { return l_cinterval(a.re*b, a.im*b); }
00472 inline l_cinterval operator *(const l_interval & a,
00473                               const l_cinterval & b) throw()
00474                                    { return l_cinterval(b.re*a, b.im*a); }
00475 inline l_cinterval operator /(const l_cinterval & a,
00476                               const l_interval & b) throw()
00477                                    { return l_cinterval(a.re/b, a.im/b); }
00478 inline l_cinterval operator /(const l_interval & a,
00479                               const l_cinterval & b) throw() 
00480                                             { return l_cinterval(a) / b; }
00481 inline l_cinterval operator |(const l_cinterval & a,
00482                               const l_interval & b) throw() 
00483                                             { return a | l_cinterval(b); }
00484 inline l_cinterval operator |(const l_interval & a,
00485                               const l_cinterval & b) throw() 
00486                                             { return l_cinterval(a) | b; }
00487 inline l_cinterval operator &(const l_cinterval & a,
00488                               const l_interval & b) throw() 
00489                                             { return a & l_cinterval(b); }
00490 inline l_cinterval operator &(const l_interval & a,
00491                               const l_cinterval & b) throw() 
00492                                             { return l_cinterval(a) & b; }
00493 
00494 inline l_cinterval & operator +=(l_cinterval & a, const l_interval & b) 
00495                                 throw() { return a = a + l_cinterval(b); }
00496 inline l_cinterval & operator -=(l_cinterval & a, const l_interval & b) 
00497                                 throw() { return a = a - l_cinterval(b); }
00498 inline l_cinterval & operator *=(l_cinterval & a, const l_interval & b) 
00499                                 throw() { return a = a * l_cinterval(b); }
00500 inline l_cinterval & operator /=(l_cinterval & a, const l_interval & b) 
00501                                 throw() { return a = a / l_cinterval(b); }
00502 inline l_cinterval & operator |=(l_cinterval & a, const l_interval & b) 
00503                                 throw() { return a = a | l_cinterval(b); }
00504 inline l_cinterval & operator &=(l_cinterval & a, const l_interval & b) 
00505                                 throw() { return a = a & l_cinterval(b); }
00506 
00507 // LCI <--> CI
00508 
00509 inline l_cinterval operator +(const l_cinterval & a, 
00510                               const cinterval & b) throw()
00511                                             { return a + l_cinterval(b); } 
00512 inline l_cinterval operator +(const cinterval & a,
00513                               const l_cinterval & b) throw() 
00514                                             { return l_cinterval(a) + b; }
00515 inline l_cinterval operator -(const l_cinterval & a,
00516                               const cinterval & b) throw() 
00517                                             { return a - l_cinterval(b); }
00518 inline l_cinterval operator -(const cinterval & a,
00519                               const l_cinterval & b) throw() 
00520                                             { return l_cinterval(a) - b; }
00521 inline l_cinterval operator *(const l_cinterval & a,
00522                               const cinterval & b) throw()
00523                                             { return a * l_cinterval(b); }
00524 inline l_cinterval operator *(const cinterval & a,
00525                               const l_cinterval & b) throw()
00526                                             { return l_cinterval(a) * b; }
00527 inline l_cinterval operator /(const l_cinterval & a,
00528                               const cinterval & b) throw()
00529                                             { return a / l_cinterval(b); }
00530 inline l_cinterval operator /(const cinterval & a,
00531                               const l_cinterval & b) throw() 
00532                                             { return l_cinterval(a) / b; }
00533 inline l_cinterval operator |(const l_cinterval & a,
00534                               const cinterval & b) throw() 
00535                                             { return a | l_cinterval(b); }
00536 inline l_cinterval operator |(const cinterval & a,
00537                               const l_cinterval & b) throw() 
00538                                             { return l_cinterval(a) | b; }
00539 inline l_cinterval operator &(const l_cinterval & a,
00540                               const cinterval & b) throw() 
00541                                             { return a & l_cinterval(b); }
00542 inline l_cinterval operator &(const cinterval & a,
00543                               const l_cinterval & b) throw() 
00544                                             { return l_cinterval(a) & b; }
00545 
00546 inline l_cinterval & operator +=(l_cinterval & a, const cinterval & b) 
00547                                 throw() { return a = a + l_cinterval(b); }
00548 inline l_cinterval & operator -=(l_cinterval & a, const cinterval & b) 
00549                                 throw() { return a = a - l_cinterval(b); }
00550 inline l_cinterval & operator *=(l_cinterval & a, const cinterval & b) 
00551                                 throw() { return a = a * l_cinterval(b); }
00552 inline l_cinterval & operator /=(l_cinterval & a, const cinterval & b) 
00553                                 throw() { return a = a / l_cinterval(b); }
00554 inline l_cinterval & operator |=(l_cinterval & a, const cinterval & b) 
00555                                 throw() { return a = a | l_cinterval(b); }
00556 inline l_cinterval & operator &=(l_cinterval & a, const cinterval & b) 
00557                                 throw() { return a = a & l_cinterval(b); }
00558 
00559 // C-R
00560 
00561 inline l_cinterval operator |(const l_complex & a, const real & b) throw() 
00562                                { return l_cinterval(a) | l_cinterval(b); }
00563 inline l_cinterval operator |(const real & a, const l_complex & b) throw() 
00564                                { return l_cinterval(a) | l_cinterval(b); }
00565 inline l_cinterval operator |(const complex & a, const l_real & b) throw() 
00566                                { return l_cinterval(a) | l_cinterval(b); }
00567 inline l_cinterval operator |(const l_real & a, const complex & b) throw() 
00568                                { return l_cinterval(a) | l_cinterval(b); }
00569 inline l_cinterval operator |(const l_complex & a, const l_real & b) throw() 
00570                                  { return l_cinterval(a) | l_cinterval(b); }
00571 inline l_cinterval operator |(const l_real & a, const l_complex & b) throw() 
00572                                  { return l_cinterval(a) | l_cinterval(b); }
00573 inline l_cinterval operator |(const cinterval & a, const l_real & b) throw() 
00574                                  { return l_cinterval(a) | l_cinterval(b); }
00575 inline l_cinterval operator |(const l_real & a, const cinterval & b) throw() 
00576                                  { return l_cinterval(a) | l_cinterval(b); }
00577 inline l_cinterval operator |(const cinterval & a, const l_complex & b) 
00578                     throw() { return l_cinterval(a) | l_cinterval(b); }
00579 inline l_cinterval operator |(const l_complex & a, const cinterval & b) 
00580                     throw() { return l_cinterval(a) | l_cinterval(b); }
00581 
00582 // LC <--> I
00583 
00584 inline l_cinterval operator +(const l_complex & a, const interval & b) throw() 
00585                                    { return l_cinterval(a) + l_cinterval(b); }
00586 inline l_cinterval operator +(const interval & a, const l_complex & b) throw() 
00587                                    { return l_cinterval(a) + l_cinterval(b); }
00588 inline l_cinterval operator -(const l_complex & a, const interval & b) throw() 
00589                                    { return l_cinterval(a) - l_cinterval(b); }
00590 inline l_cinterval operator -(const interval & a, const l_complex & b) throw() 
00591                                    { return l_cinterval(a) - l_cinterval(b); }
00592 inline l_cinterval operator *(const l_complex & a, const interval & b) throw()
00593                                                 { return l_cinterval(a) * b; }
00594 inline l_cinterval operator *(const interval & a, const l_complex & b) throw()
00595                                                 { return l_cinterval(b) * a; }
00596 inline l_cinterval operator /(const l_complex & a, const interval & b) throw()
00597                                                 { return l_cinterval(a) / b; }
00598 inline l_cinterval operator /(const interval & a, const l_complex & b) throw()
00599                                    { return l_cinterval(a) / l_cinterval(b); }
00600 inline l_cinterval operator |(const l_complex & a, const interval & b) throw()
00601                                    { return l_cinterval(a) | l_cinterval(b); }
00602 inline l_cinterval operator |(const interval & a, const l_complex & b) throw()
00603                                    { return l_cinterval(a) | l_cinterval(b); }
00604 inline l_cinterval operator &(const l_complex & a, const interval & b) throw()
00605                                    { return l_cinterval(a) & l_cinterval(b); }
00606 inline l_cinterval operator &(const interval & a, const l_complex & b) throw()
00607                                    { return l_cinterval(a) & l_cinterval(b); }
00608 
00609 // C <--> LI
00610 
00611 inline l_cinterval operator +(const complex & a, const l_interval & b) throw() 
00612                                    { return l_cinterval(a) + l_cinterval(b); }
00613 inline l_cinterval operator +(const l_interval & a, const complex & b) throw() 
00614                                    { return l_cinterval(a) + l_cinterval(b); }
00615 inline l_cinterval operator -(const complex & a, const l_interval & b) throw() 
00616                                    { return l_cinterval(a) - l_cinterval(b); }
00617 inline l_cinterval operator -(const l_interval & a, const complex & b) throw() 
00618                                    { return l_cinterval(a) - l_cinterval(b); }
00619 inline l_cinterval operator *(const complex & a, const l_interval & b) throw()
00620                                                 { return l_cinterval(a) * b; }
00621 inline l_cinterval operator *(const l_interval & a, const complex & b) throw()
00622                                                 { return l_cinterval(b) * a; }
00623 inline l_cinterval operator /(const complex & a, const l_interval & b) throw()
00624                                                 { return l_cinterval(a) / b; }
00625 inline l_cinterval operator /(const l_interval & a, const complex & b) throw()
00626                                    { return l_cinterval(a) / l_cinterval(b); }
00627 inline l_cinterval operator |(const complex & a, const l_interval & b) throw()
00628                                    { return l_cinterval(a) | l_cinterval(b); }
00629 inline l_cinterval operator |(const l_interval & a, const complex & b) throw()
00630                                    { return l_cinterval(a) | l_cinterval(b); }
00631 inline l_cinterval operator &(const complex & a, const l_interval & b) throw()
00632                                    { return l_cinterval(a) & l_cinterval(b); }
00633 inline l_cinterval operator &(const l_interval & a, const complex & b) throw()
00634                                    { return l_cinterval(a) & l_cinterval(b); }
00635 
00636 // LC <--> LI
00637 
00638 inline l_cinterval operator +(const l_complex & a, const l_interval & b) 
00639                            throw() { return l_cinterval(a) + l_cinterval(b); }
00640 inline l_cinterval operator +(const l_interval & a, const l_complex & b) 
00641                            throw() { return l_cinterval(a) + l_cinterval(b); }
00642 inline l_cinterval operator -(const l_complex & a, const l_interval & b) 
00643                            throw() { return l_cinterval(a) - l_cinterval(b); }
00644 inline l_cinterval operator -(const l_interval & a, const l_complex & b) 
00645                            throw() { return l_cinterval(a) - l_cinterval(b); }
00646 inline l_cinterval operator *(const l_complex & a, const l_interval & b) 
00647                                         throw() { return l_cinterval(a) * b; }
00648 inline l_cinterval operator *(const l_interval & a, const l_complex & b) 
00649                                         throw() { return l_cinterval(b) * a; }
00650 inline l_cinterval operator /(const l_complex & a, const l_interval & b) 
00651                                         throw() { return l_cinterval(a) / b; }
00652 inline l_cinterval operator /(const l_interval & a, const l_complex & b) 
00653                            throw() { return l_cinterval(a) / l_cinterval(b); }
00654 inline l_cinterval operator |(const l_complex & a, const l_interval & b) 
00655                            throw() { return l_cinterval(a) | l_cinterval(b); }
00656 inline l_cinterval operator |(const l_interval & a, const l_complex & b) 
00657                            throw() { return l_cinterval(a) | l_cinterval(b); }
00658 inline l_cinterval operator &(const l_complex & a, const l_interval & b) 
00659                            throw() { return l_cinterval(a) & l_cinterval(b); }
00660 inline l_cinterval operator &(const l_interval & a, const l_complex & b) 
00661                            throw() { return l_cinterval(a) & l_cinterval(b); }
00662 
00663 
00664 // LC <--> C
00665 
00666 inline l_cinterval operator |(const l_complex & a, const complex & b) 
00667                            throw() { return l_cinterval(a) | l_cinterval(b); }
00668 inline l_cinterval operator |(const complex & a, const l_complex & b) 
00669                            throw() { return l_cinterval(a) | l_cinterval(b); }
00670 inline l_cinterval operator |(const l_complex & a, const l_complex & b) 
00671                            throw() { return l_cinterval(a) | l_cinterval(b); }
00672 
00673 
00674 // ---- Comp.Operat.  ---------------------------------------
00675 
00676 inline bool operator== (const l_cinterval & a, const l_cinterval & b) throw()
00677 {
00678    return a.re==b.re && a.im==b.im;
00679 }
00680 inline bool operator!= (const l_cinterval & a, const l_cinterval & b) throw()
00681 {
00682    return a.re!=b.re || a.im!=b.im;
00683 }
00684 
00685 
00686 // LCI-R
00687 
00688 inline bool operator== (const l_cinterval & a, const real & b) throw() 
00689                                               { return a == l_cinterval(b); }
00690 inline bool operator== (const real & a, const l_cinterval & b) throw() 
00691                                               { return l_cinterval(a) == b; }
00692 inline bool operator!= (const l_cinterval & a, const real & b) throw() 
00693                                               { return a != l_cinterval(b); }
00694 inline bool operator!= (const real & a, const l_cinterval & b) throw() 
00695                                               { return l_cinterval(a) != b; }
00696 
00697 // LCI-LR
00698 
00699 inline bool operator== (const l_cinterval & a, const l_real & b) throw() 
00700                                               { return a == l_cinterval(b); }
00701 inline bool operator== (const l_real & a, const l_cinterval & b) throw() 
00702                                               { return l_cinterval(a) == b; }
00703 inline bool operator!= (const l_cinterval & a, const l_real & b) throw() 
00704                                               { return a != l_cinterval(b); }
00705 inline bool operator!= (const l_real & a, const l_cinterval & b) throw() 
00706                                               { return l_cinterval(a) != b; }
00707 
00708 // LCI <--> I
00709 
00710 inline bool operator== (const l_cinterval & a, const interval & b) throw() 
00711                                               { return a == l_cinterval(b); }
00712 inline bool operator== (const interval & a, const l_cinterval & b) throw() 
00713                                               { return l_cinterval(a) == b; }
00714 inline bool operator!= (const l_cinterval & a, const interval & b) throw() 
00715                                               { return a != l_cinterval(b); }
00716 inline bool operator!= (const interval & a, const l_cinterval & b) throw() 
00717                                               { return l_cinterval(a) != b; }
00718 
00719 // LCI <--> LI
00720 
00721 inline bool operator== (const l_cinterval & a, const l_interval & b) throw() 
00722                                              { return a == l_cinterval(b); }
00723 inline bool operator== (const l_interval & a, const l_cinterval & b) throw() 
00724                                              { return l_cinterval(a) == b; }
00725 inline bool operator!= (const l_cinterval & a, const l_interval & b) throw() 
00726                                              { return a != l_cinterval(b); }
00727 inline bool operator!= (const l_interval & a, const l_cinterval & b) throw() 
00728                                              { return l_cinterval(a) != b; }
00729 
00730 // LCI <--> C
00731 
00732 inline bool operator== (const l_cinterval & a, const complex & b) throw() 
00733                                             { return a == l_cinterval(b); }
00734 inline bool operator== (const complex & a, const l_cinterval & b) throw() 
00735                                             { return l_cinterval(a) == b; }
00736 inline bool operator!= (const l_cinterval & a, const complex & b) throw() 
00737                                             { return a != l_cinterval(b); }
00738 inline bool operator!= (const complex & a, const l_cinterval & b) throw() 
00739                                             { return l_cinterval(a) != b; }
00740 
00741 // LCI <--> LC
00742 
00743 inline bool operator== (const l_cinterval & a, const l_complex & b) throw() 
00744                                             { return a == l_cinterval(b); }
00745 inline bool operator== (const l_complex & a, const l_cinterval & b) throw() 
00746                                             { return l_cinterval(a) == b; }
00747 inline bool operator!= (const l_cinterval & a, const l_complex & b) throw() 
00748                                             { return a != l_cinterval(b); }
00749 inline bool operator!= (const l_complex & a, const l_cinterval & b) throw() 
00750                                             { return l_cinterval(a) != b; }
00751 
00752 // LCI <--> CI
00753 
00754 inline bool operator== (const l_cinterval & a, const cinterval & b) throw() 
00755                                             { return a == l_cinterval(b); }
00756 inline bool operator== (const cinterval & a, const l_cinterval & b) throw() 
00757                                             { return l_cinterval(a) == b; }
00758 inline bool operator!= (const l_cinterval & a, const cinterval & b) throw() 
00759                                             { return a != l_cinterval(b); }
00760 inline bool operator!= (const cinterval & a, const l_cinterval & b) throw() 
00761                                             { return l_cinterval(a) != b; }
00762 
00763 
00764 // ---- Set Operators ----
00765 inline bool operator  <(const l_cinterval & a, const l_cinterval & b) throw()
00766 {
00767    if (Inf(a.re) <= Inf(b.re) || Sup(a.re) >= Sup(b.re)) 
00768       return false;
00769    if (Inf(a.im) <= Inf(b.im) || Sup(a.im) >= Sup(b.im)) 
00770       return false;
00771       
00772    return true; 
00773 }
00774 
00775 inline bool operator  >(const l_cinterval & a, const l_cinterval & b) throw() 
00776                                                             { return b < a; }
00777 
00778 inline bool operator <=(const l_cinterval & a, const l_cinterval & b) throw()
00779 {
00780    if (Inf(a.re) < Inf(b.re) || Sup(a.re) > Sup(b.re)) 
00781       return false;
00782    if (Inf(a.im) < Inf(b.im) || Sup(a.im) > Sup(b.im)) 
00783       return false;
00784       
00785    return true; 
00786 }
00787 
00788 inline bool operator >= (const l_cinterval & a, const l_cinterval & b) throw()
00789                                                             { return b <= a; }
00790 
00791 // lCI <--> R
00792 
00793 inline bool operator  <(const real & a, const l_cinterval & b) throw() 
00794                                         { return l_cinterval(a) < b; }
00795 inline bool operator  >(const real & a, const l_cinterval & b) throw() 
00796                                         { return l_cinterval(a) > b; }
00797 inline bool operator <=(const real & a, const l_cinterval & b) throw() 
00798                                        { return l_cinterval(a) <= b; }
00799 inline bool operator >=(const real & a, const l_cinterval & b) throw() 
00800                                        { return l_cinterval(a) >= b; }
00801 
00802 inline bool operator  <(const l_cinterval & a, const real & b) throw() 
00803                                         { return a < l_cinterval(b); }
00804 inline bool operator  >(const l_cinterval & a, const real & b) throw() 
00805                                         { return a > l_cinterval(b); }
00806 inline bool operator <=(const l_cinterval & a, const real & b) throw() 
00807                                        { return a <= l_cinterval(b); }
00808 inline bool operator >=(const l_cinterval & a, const real & b) throw() 
00809                                        { return a >= l_cinterval(b); }
00810 
00811 // lCI <--> LR
00812 
00813 inline bool operator  <(const l_real & a, const l_cinterval & b) throw() 
00814                                           { return l_cinterval(a) < b; }
00815 inline bool operator  >(const l_real & a, const l_cinterval & b) throw() 
00816                                           { return l_cinterval(a) > b; }
00817 inline bool operator <=(const l_real & a, const l_cinterval & b) throw() 
00818                                          { return l_cinterval(a) <= b; }
00819 inline bool operator >=(const l_real & a, const l_cinterval & b) throw() 
00820                                          { return l_cinterval(a) >= b; }
00821 
00822 inline bool operator  <(const l_cinterval & a, const l_real & b) throw() 
00823                                           { return a < l_cinterval(b); }
00824 inline bool operator  >(const l_cinterval & a, const l_real & b) throw() 
00825                                           { return a > l_cinterval(b); }
00826 inline bool operator <=(const l_cinterval & a, const l_real & b) throw() 
00827                                          { return a <= l_cinterval(b); }
00828 inline bool operator >=(const l_cinterval & a, const l_real & b) throw() 
00829                                          { return a >= l_cinterval(b); }
00830 
00831 // LCI <--> I
00832 
00833 inline bool operator  <(const interval & a, const l_cinterval & b) throw() 
00834                                             { return l_cinterval(a) < b; }
00835 inline bool operator  >(const interval & a, const l_cinterval & b) throw()
00836                                             { return l_cinterval(a) > b; }
00837 inline bool operator <=(const interval & a, const l_cinterval & b) throw()
00838                                            { return l_cinterval(a) <= b; }
00839 inline bool operator >=(const interval & a, const l_cinterval & b) throw() 
00840                                            { return l_cinterval(a) >= b; }
00841 
00842 inline bool operator  <(const l_cinterval & a, const interval & b) throw() 
00843                                             { return a < l_cinterval(b); }
00844 inline bool operator  >(const l_cinterval & a, const interval & b) throw() 
00845                                             { return a > l_cinterval(b); }
00846 inline bool operator <=(const l_cinterval & a, const interval & b) throw() 
00847                                            { return a <= l_cinterval(b); }
00848 inline bool operator >=(const l_cinterval & a, const interval & b) throw() 
00849                                            { return a >= l_cinterval(b); }
00850 
00851 // LCI <--> LI
00852 
00853 inline bool operator  <(const l_interval & a, const l_cinterval & b) throw() 
00854                                               { return l_cinterval(a) < b; }
00855 inline bool operator  >(const l_interval & a, const l_cinterval & b) throw()
00856                                               { return l_cinterval(a) > b; }
00857 inline bool operator <=(const l_interval & a, const l_cinterval & b) throw()
00858                                              { return l_cinterval(a) <= b; }
00859 inline bool operator >=(const l_interval & a, const l_cinterval & b) throw() 
00860                                              { return l_cinterval(a) >= b; }
00861 
00862 inline bool operator  <(const l_cinterval & a, const l_interval & b) throw() 
00863                                               { return a < l_cinterval(b); }
00864 inline bool operator  >(const l_cinterval & a, const l_interval & b) throw() 
00865                                               { return a > l_cinterval(b); }
00866 inline bool operator <=(const l_cinterval & a, const l_interval & b) throw() 
00867                                              { return a <= l_cinterval(b); }
00868 inline bool operator >=(const l_cinterval & a, const l_interval & b) throw() 
00869                                              { return a >= l_cinterval(b); }
00870 
00871 // LCI <--> C
00872 
00873 inline bool operator  <(const complex & a, const l_cinterval & b) throw() 
00874                                            { return l_cinterval(a) < b; }
00875 inline bool operator  >(const complex & a, const l_cinterval & b) throw()
00876                                            { return l_cinterval(a) > b; }
00877 inline bool operator <=(const complex & a, const l_cinterval & b) throw()
00878                                           { return l_cinterval(a) <= b; }
00879 inline bool operator >=(const complex & a, const l_cinterval & b) throw()
00880                                           { return l_cinterval(a) >= b; }
00881 
00882 inline bool operator  <(const l_cinterval & a, const complex & b) throw()
00883                                            { return a < l_cinterval(b); }
00884 inline bool operator  >(const l_cinterval & a, const complex & b) throw() 
00885                                            { return a > l_cinterval(b); }
00886 inline bool operator <=(const l_cinterval & a, const complex & b) throw() 
00887                                           { return a <= l_cinterval(b); }
00888 inline bool operator >=(const l_cinterval & a, const complex & b) throw()
00889                                           { return a >= l_cinterval(b); }
00890 
00891 // LCI <--> LC
00892 
00893 inline bool operator  <(const l_complex & a, const l_cinterval & b) throw() 
00894                                              { return l_cinterval(a) < b; }
00895 inline bool operator  >(const l_complex & a, const l_cinterval & b) throw()
00896                                              { return l_cinterval(a) > b; }
00897 inline bool operator <=(const l_complex & a, const l_cinterval & b) throw()
00898                                             { return l_cinterval(a) <= b; }
00899 inline bool operator >=(const l_complex & a, const l_cinterval & b) throw()
00900                                             { return l_cinterval(a) >= b; }
00901 
00902 inline bool operator  <(const l_cinterval & a, const l_complex & b) throw()
00903                                              { return a < l_cinterval(b); }
00904 inline bool operator  >(const l_cinterval & a, const l_complex & b) throw() 
00905                                              { return a > l_cinterval(b); }
00906 inline bool operator <=(const l_cinterval & a, const l_complex & b) throw() 
00907                                             { return a <= l_cinterval(b); }
00908 inline bool operator >=(const l_cinterval & a, const l_complex & b) throw()
00909                                             { return a >= l_cinterval(b); }
00910 
00911 // LCI <--> CI
00912 
00913 inline bool operator  <(const cinterval & a, const l_cinterval & b) throw() 
00914                                              { return l_cinterval(a) < b; }
00915 inline bool operator  >(const cinterval & a, const l_cinterval & b) throw()
00916                                              { return l_cinterval(a) > b; }
00917 inline bool operator <=(const cinterval & a, const l_cinterval & b) throw()
00918                                             { return l_cinterval(a) <= b; }
00919 inline bool operator >=(const cinterval & a, const l_cinterval & b) throw()
00920                                             { return l_cinterval(a) >= b; }
00921 
00922 inline bool operator  <(const l_cinterval & a, const cinterval & b) throw()
00923                                              { return a < l_cinterval(b); }
00924 inline bool operator  >(const l_cinterval & a, const cinterval & b) throw() 
00925                                              { return a > l_cinterval(b); }
00926 inline bool operator <=(const l_cinterval & a, const cinterval & b) throw() 
00927                                             { return a <= l_cinterval(b); }
00928 inline bool operator >=(const l_cinterval & a, const cinterval & b) throw()
00929                                             { return a >= l_cinterval(b); }
00930 
00931 
00932 // ---- Others   -------------------------------------------
00933 
00934 inline l_complex    Inf(const l_cinterval & a) throw() 
00935                                  { return l_complex(Inf(a.re),Inf(a.im)); }
00936 inline l_complex    Sup(const l_cinterval & a) throw() 
00937                                  { return l_complex(Sup(a.re),Sup(a.im)); }
00938 
00939 inline l_cinterval & SetInf(l_cinterval & a, const complex & b) 
00940                                       throw(ERROR_CINTERVAL_EMPTY_INTERVAL)
00941 {
00942    Inf(a.re) = Re(b);
00943    Inf(a.im) = Im(b);
00944 
00945    if (Inf(a.re) > Sup(a.re) || Inf(a.im) > Sup(a.im)) 
00946       cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL("inline l_cinterval & SetInf(l_cinterval & a, const complex & b)"));
00947    
00948    return a;
00949 }
00950 
00951 inline l_cinterval & SetSup(l_cinterval & a, const complex & b) 
00952                                       throw(ERROR_CINTERVAL_EMPTY_INTERVAL)
00953 {
00954    Sup(a.re)=Re(b);
00955    Sup(a.im)=Im(b);
00956 
00957    if (Inf(a.re) > Sup(a.re) || Inf(a.im) > Sup(a.im)) 
00958       cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL("inline l_cinterval & SetSup(l_cinterval & a, const complex & b)"));
00959    
00960    return a;
00961 }
00962 
00963 inline l_cinterval & SetInf(l_cinterval & a, const l_complex & b) 
00964                                       throw(ERROR_CINTERVAL_EMPTY_INTERVAL)
00965 {
00966    Inf(a.re) = Re(b);
00967    Inf(a.im) = Im(b);
00968 
00969    if (Inf(a.re) > Sup(a.re) || Inf(a.im) > Sup(a.im)) 
00970       cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL("inline l_cinterval & SetInf(l_cinterval & a, const l_complex & b)"));
00971    
00972    return a;
00973 }
00974 
00975 inline l_cinterval & SetSup(l_cinterval & a, const l_complex & b) 
00976                                       throw(ERROR_CINTERVAL_EMPTY_INTERVAL)
00977 {
00978    Sup(a.re)=Re(b);
00979    Sup(a.im)=Im(b);
00980 
00981    if (Inf(a.re) > Sup(a.re) || Inf(a.im) > Sup(a.im)) 
00982       cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL("inline l_cinterval & SetSup(l_cinterval & a, const l_complex & b)"));
00983    
00984    return a;
00985 }
00986 
00987 inline l_cinterval & SetInf(l_cinterval & a, const real & b) 
00988                          throw(ERROR_CINTERVAL_EMPTY_INTERVAL)
00989 {
00990    Inf(a.re)=b;
00991    Inf(a.im)=0.0;
00992 
00993    if (Inf(a.re) > Sup(a.re) || Inf(a.im) > Sup(a.im)) 
00994       cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL("inline l_cinterval & SetSup(l_cinterval & a, const real & b)"));
00995    
00996    return a;
00997 }
00998 
00999 inline l_cinterval & SetSup(l_cinterval & a, const real & b) 
01000                          throw(ERROR_CINTERVAL_EMPTY_INTERVAL)
01001 {
01002    Sup(a.re)=b;
01003    Sup(a.im)=0.0;
01004 
01005    if (Inf(a.re) > Sup(a.re) || Inf(a.im) > Sup(a.im)) 
01006       cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL("inline l_cinterval & SetSup(l_cinterval & a, const real & b)"));
01007    
01008    return a;
01009 }
01010 
01011 inline l_cinterval & SetInf(l_cinterval & a, const l_real & b) 
01012                          throw(ERROR_CINTERVAL_EMPTY_INTERVAL)
01013 {
01014    Inf(a.re)=b;
01015    Inf(a.im)=0.0;
01016 
01017    if (Inf(a.re) > Sup(a.re) || Inf(a.im) > Sup(a.im)) 
01018       cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL("inline l_cinterval & SetSup(l_cinterval & a, const l_real & b)"));
01019    
01020    return a;
01021 }
01022 
01023 inline l_cinterval & SetSup(l_cinterval & a, const l_real & b) 
01024                          throw(ERROR_CINTERVAL_EMPTY_INTERVAL)
01025 {
01026    Sup(a.re)=b;
01027    Sup(a.im)=0.0;
01028 
01029    if (Inf(a.re) > Sup(a.re) || Inf(a.im) > Sup(a.im)) 
01030       cxscthrow(ERROR_CINTERVAL_EMPTY_INTERVAL("inline l_cinterval & SetSup(l_cinterval & a, const l_real & b)"));
01031    
01032    return a;
01033 }
01034 
01035 
01036 inline l_cinterval & UncheckedSetInf(l_cinterval & a, const complex & b)
01037                                                                    throw()
01038 {
01039    Inf(a.re)=Re(b);
01040    Inf(a.im)=Im(b);
01041    return a;
01042 }
01043 
01044 inline l_cinterval & UncheckedSetInf(l_cinterval & a, const real & b) 
01045                                                                 throw()
01046 {
01047    Inf(a.re)=b;
01048    Inf(a.im)=0.0;
01049    return a;
01050 }
01051 
01052 inline l_cinterval & UncheckedSetSup(l_cinterval & a, const complex & b) 
01053                                                                    throw()
01054 {
01055    Sup(a.re)=Re(b);
01056    Sup(a.im)=Im(b);
01057    return a;
01058 }
01059 
01060 inline l_cinterval & UncheckedSetSup(l_cinterval & a, const real & b) 
01061                                                                 throw()
01062 {
01063    Sup(a.re)=b;
01064    Sup(a.im)=0.0;
01065    return a;
01066 }
01067 
01068 inline l_cinterval & UncheckedSetInf(l_cinterval & a, const l_complex & b)
01069                                                                    throw()
01070 {
01071    Inf(a.re)=Re(b);
01072    Inf(a.im)=Im(b);
01073    return a;
01074 }
01075 
01076 inline l_cinterval & UncheckedSetInf(l_cinterval & a, const l_real & b) 
01077                                                                 throw()
01078 {
01079    Inf(a.re)=b;
01080    Inf(a.im)=0.0;
01081    return a;
01082 }
01083 
01084 inline l_cinterval & UncheckedSetSup(l_cinterval & a, const l_complex & b) 
01085                                                                    throw()
01086 {
01087    Sup(a.re)=Re(b);
01088    Sup(a.im)=Im(b);
01089    return a;
01090 }
01091 
01092 inline l_cinterval & UncheckedSetSup(l_cinterval & a, const l_real & b) 
01093                                                                 throw()
01094 {
01095    Sup(a.re)=b;
01096    Sup(a.im)=0.0;
01097    return a;
01098 }
01099 
01100 
01101 inline l_cinterval conj(const l_cinterval & a) throw() 
01102 { return l_cinterval(a.re,-a.im); }
01103 
01104 inline l_complex mid(const l_cinterval &a) throw() 
01105 { return l_complex(mid(a.re), mid(a.im)); }
01106 
01107 inline l_complex diam(const l_cinterval &a) throw()
01108 { return l_complex(diam(a.re),diam(a.im)); }
01109 
01110 inline l_cinterval adjust(const l_cinterval & a) throw() 
01111 { 
01112   return l_cinterval(adjust(Re(a)),adjust(Im(a)));      
01113         
01114 // return l_cinterval(a.re,-a.im); 
01115 }
01116 
01117 inline void times2pown(l_cinterval& x, const int& n) throw() 
01118 // Blomquist, 08.03.07;
01119 {
01120     if ( n<-1074 || n>1023 ) 
01121     { std::cerr << "Error in:  " 
01122            << "times2pown(l_cinterval& x, const int& n): " << std::endl
01123            << " -1074 <= n <= +1023 not fulfilled" << std::endl; exit(0); 
01124     }
01125     l_interval u(Re(x)),v(Im(x));
01126     times2pown(u,n);
01127     times2pown(v,n);
01128     x = l_cinterval(u,v);
01129 }
01130 
01131 inline void Times2pown(l_cinterval& x, const int& n) throw() 
01132 // Blomquist, 28.03.07;
01133 {
01134 
01135     l_interval u(Re(x)),v(Im(x));
01136     Times2pown(u,n);
01137     Times2pown(v,n);
01138     x = l_cinterval(u,v);
01139 }
01140 
01141 
01142 } // namespace cxsc
01143 
01144 
01145 
01146