| 
 | |||||||
| 
 | |||||||
|  | |||||||
| Prototype | |||||||
| template <class Tnum> interval<Tnum> operator + (const interval<Tnum>& x, const interval<Tnum>& y) ; | |||||||
|  | |||||||
| Description | |||||||
| Adds two intervals, returning the answer as an interval rounded outward. | |||||||
|  | |||||||
| Definition | |||||||
| interval.cct | |||||||
|  | |||||||
| Preconditions | |||||||
|  | |||||||
|  | |||||||
| Complexity | |||||||
|  | |||||||
| Example | |||||||
| In operator.cc: C=A+B; cout << "A+B = \n" << C << endl; C-=B; cout << "A+B-B = \n" << C << endl; C/=A; cout << "(A+B-B)/A = \n" << C << endl; C*=B; cout << "((A+B-B)/A)*B = \n" << C << endl; C*=Num(5); cout << "(((A+B-B)/A)*B)*5.0 = \n" << C << endl; C+=Num(2); cout << "((((A+B-B)/A)*B)*5.0)+2.0 = \n" << C << endl; C-=A; cout << "(((((A+B-B)/A)*B)*5.0)+2.0)-A = \n" << C << endl; | |||||||
|  | |||||||
| Notes | |||||||
|  | |||||||
| See also | |||||||

![[MTL Home]](./ndtoclogo.gif) Copyright ©
1998,1999 University of Notre Dame.  All Rights Reserved.
Copyright ©
1998,1999 University of Notre Dame.  All Rights Reserved.