Re: [Boost-bugs] [Boost C++ Libraries] #2228: signed overflow problem in weighted_sum on VC9.0

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2228: signed overflow problem in weighted_sum on VC9.0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-08-19 18:02:37


#2228: signed overflow problem in weighted_sum on VC9.0
---------------------------+------------------------------------------------
  Reporter: pavol_droba | Owner: eric_niebler
      Type: Bugs | Status: closed
 Milestone: Boost 1.36.0 | Component: accumulator
   Version: Boost 1.36.0 | Severity: Problem
Resolution: invalid | Keywords:
---------------------------+------------------------------------------------

Comment(by pavol_droba):

 I understand that the current solution is technically correct. However I
 think that conceptually it is not.

 An example: To calculate a weighted mean of signed integers, where weight
 represents sample cardinality, I would consider it quite natural to expect
 that the mean
 will be signed, since I'm accumulating signed integers. Even though the
 cardinality is natural (i.e. unsigned) number.

-- 
Ticket URL: <http://svn.boost.org/trac/boost/ticket/2228#comment:2>
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:58 UTC