[Boost-bugs] [Boost C++ Libraries] #2671: Calculation overflow for the 4th moment

Subject: [Boost-bugs] [Boost C++ Libraries] #2671: Calculation overflow for the 4th moment
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-01-22 15:10:22


#2671: Calculation overflow for the 4th moment
------------------------------------+---------------------------------------
 Reporter: m.de.wever_at_[hidden] | Owner: eric_niebler
     Type: Bugs | Status: new
Milestone: Boost 1.38.0 | Component: accumulator
  Version: Boost 1.37.0 | Severity: Showstopper
 Keywords: |
------------------------------------+---------------------------------------
 While testing the accumulator library the calculation of the kurtosis goes
 wrong with a larger dataset. I traced to problem down to the calculation
 of the 4th moment which seems to overflow. The attached program produces
 the following output on a 32 bit machine.
 {{{
 2.44141e+08
 2.48094e+08
 2.52111e+08
 2.56192e+08
 2.60338e+08
 2.6455e+08
 2.68829e+08
 2.73175e+08
 2.77589e+08
 2.82072e+08
 2.86624e+08
 2.91247e+08
 2.95942e+08
 3.00708e+08
 1.92167e+07
 4.20257e+07
 6.28038e+07
 8.19029e+07
 9.96007e+07
 1.1612e+08
 1.3164e+08
 1.4631e+08
 1.60251e+08
 1.73565e+08
 1.45388e+07
 }}}

 PS I didn't test whether the 3th moment also can overflow, but I had no
 problem with the calculation of the skewness.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2671>
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