Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6057: Lazy variance in accumulator gives wrong result when too high statistics
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-11-16 08:06:44
#6057: Lazy variance in accumulator gives wrong result when too high statistics
----------------------------------------------+-----------------------------
Reporter: Johan <johan.luisier@â¦> | Owner: troyer
Type: Bugs | Status: reopened
Milestone: To Be Determined | Component: accumulator
Version: Boost 1.44.0 | Severity: Problem
Resolution: | Keywords: accumulator lazy_variance
----------------------------------------------+-----------------------------
Changes (by troyer):
* status: closed => reopened
* resolution: worksforme =>
Comment:
Thank you for the updated example which now indeed shows what you report.
The reason is simply an overflow in the sum of squares. To avoid it just
use double instead of signed int as sample type - just as you do in your
own reference class where you store MeanSq also as double.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6057#comment:4> 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:50:11 UTC