Ticket #1944: interval_pow.patch

File interval_pow.patch, 658 bytes (added by Ben Galehouse <bgalehouse@…>, 14 years ago)
  • arith2.hpp

     
    185185      return I(yl, yu, true);
    186186  } else if (interval_lib::user::is_neg(x.lower())) { // [-1,1]
    187187    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);
    189189    } else {         // [-1,1]^2
    190190      return I(static_cast<T>(0), pow_up(max BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<T>(-x.lower()), x.upper()), pwr, rnd), true);
    191191    }