Subject: [Boost-bugs] [Boost C++ Libraries] #2473: unsigned integers going into interval of doubles get wrongly negated
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-11-04 13:12:15
#2473: unsigned integers going into interval of doubles get wrongly negated
-----------------------------------------------------+----------------------
Reporter: David Monniaux <David.Monniaux_at_[hidden]> | Owner: bgubenko
Type: Bugs | Status: new
Milestone: Boost 1.38.0 | Component: interval
Version: Boost Development Trunk | Severity: Problem
Keywords: unsigned |
-----------------------------------------------------+----------------------
interval<double> x(1U) gets wrong lower bound (-2**32+1 instead of 1).
Apparently, the unary - operation is performed on the unsigned int instead
of the double.
Workaround: manually cast to double before creating the interval.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/2473> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC