Changeset 183 for stable/0.2/Couenne
 Timestamp:
 Jul 1, 2009 9:41:30 AM (12 years ago)
 Location:
 stable/0.2
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

stable/0.2

stable/0.2/Couenne/src/expression/operators/exprCos.cpp
r159 r183 1 /* $Id : exprCos.cpp 141 20090603 04:19:19Z pbelotti $ */2 /*1 /* $Id$ 2 * 3 3 * Name: exprCos.cpp 4 4 * Author: Pietro Belotti 5 5 * Purpose: methods for cosines 6 6 * 7 * (C) CarnegieMellon University, 20060 8.7 * (C) CarnegieMellon University, 200609. 8 8 * This file is licensed under the Common Public License (CPL) 9 9 */ … … 43 43 } 44 44 45 46 45 // compute value of bounds of cos x given bounds of x 47 46 void exprCos::getBounds (CouNumber &lb, CouNumber &ub) { 48 47 49 CouNumber l, u , pi2 = 2 * M_PI;48 CouNumber l, u; 50 49 argument_ > getBounds (l, u); 51 50 
stable/0.2/Couenne/src/expression/operators/exprSin.cpp
r159 r183 1 /* $Id : exprSin.cpp 154 20090616 18:52:53Z pbelotti $ */2 /*1 /* $Id$ 2 * 3 3 * Name: exprSin.cpp 4 4 * Author: Pietro Belotti 5 5 * Purpose: definition of the sine of a function 6 6 * 7 * (C) CarnegieMellon University, 20060 8.7 * (C) CarnegieMellon University, 200609. 8 8 * This file is licensed under the Common Public License (CPL) 9 9 */ … … 42 42 } 43 43 44 45 44 // compute value of bounds of cos x given bounds of x 46 45 void exprSin::getBounds (CouNumber &lb, CouNumber &ub) { 47 46 48 47 CouNumber l, u; 49 50 48 argument_ > getBounds (l, u); 51 52 CouNumber pi2 = 2 * M_PI;53 49 54 50 if ((u  l > pi2)  // 1) interval spans whole cycle … … 56 52 floor (u/pi2  0.75))) 57 53 lb = 1.; 58 else lb = CoinMin ( cos (l), cos(u));54 else lb = CoinMin (sin (l), sin (u)); 59 55 60 56 if ((u  l > pi2)  // 1) interval spans whole cycle … … 62 58 floor (u/pi2  0.25))) 63 59 ub = 1.; 64 else ub = CoinMax ( cos (l), cos(u));60 else ub = CoinMax (sin (l), sin (u)); 65 61 } 66 62
Note: See TracChangeset
for help on using the changeset viewer.