Ticket #1944: interval_pow.patch
File interval_pow.patch, 658 bytes (added by , 14 years ago) |
---|
-
arith2.hpp
185 185 return I(yl, yu, true); 186 186 } else if (interval_lib::user::is_neg(x.lower())) { // [-1,1] 187 187 if (pwr & 1) { // [-1,1]^1 188 return I(-pow_up( -x.lower(), pwr, rnd), pow_up(x.upper(), pwr, rnd), true);188 return I(-pow_up(static_cast<T>(-x.lower()), pwr, rnd), pow_up(x.upper(), pwr, rnd), true); 189 189 } else { // [-1,1]^2 190 190 return I(static_cast<T>(0), pow_up(max BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<T>(-x.lower()), x.upper()), pwr, rnd), true); 191 191 }