Boost logo

Boost-Commit :

From: guillaume.melquiond_at_[hidden]
Date: 2008-08-05 06:08:56


Author: gmelquio
Date: 2008-08-05 06:08:56 EDT (Tue, 05 Aug 2008)
New Revision: 47986
URL: http://svn.boost.org/trac/boost/changeset/47986

Log:
Fix bug #1944.
Text files modified:
   trunk/boost/numeric/interval/arith2.hpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: trunk/boost/numeric/interval/arith2.hpp
==============================================================================
--- trunk/boost/numeric/interval/arith2.hpp (original)
+++ trunk/boost/numeric/interval/arith2.hpp 2008-08-05 06:08:56 EDT (Tue, 05 Aug 2008)
@@ -185,7 +185,7 @@
       return I(yl, yu, true);
   } else if (interval_lib::user::is_neg(x.lower())) { // [-1,1]
     if (pwr & 1) { // [-1,1]^1
- return I(-pow_up(-x.lower(), pwr, rnd), pow_up(x.upper(), pwr, rnd), true);
+ return I(-pow_up(static_cast<T>(-x.lower()), pwr, rnd), pow_up(x.upper(), pwr, rnd), true);
     } else { // [-1,1]^2
       return I(static_cast<T>(0), pow_up(max BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<T>(-x.lower()), x.upper()), pwr, rnd), true);
     }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk