uniqueness-periods-vector-stats 0.1.1.0 → 0.1.2.0
raw patch · 3 files changed
+6/−13 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Numeric.Stats: meanWithDispF :: [Float] -> (Float, Float)
- Numeric.Stats: meanWithDispersionF :: [Float] -> Float# -> Float# -> Float# -> Float# -> Float# -> (Float, Float)
Files
- ChangeLog.md +5/−1
- Numeric/Stats.hs +0/−11
- uniqueness-periods-vector-stats.cabal +1/−1
ChangeLog.md view
@@ -6,5 +6,9 @@ ## 0.1.1.0 -- 2020-09-19 -* First version revised. Fixed issues with not importing from GHC.Prim fabsFloat# for GHC lower than 8.2* versions. Removed functions that used Neumaier summation because+* First version revised A. Fixed issues with not importing from GHC.Prim fabsFloat# for GHC lower than 8.2* versions. Removed functions that used Neumaier summation because they do not have the intended behaviour. ++## 0.1.2.0 -- 2020-09-19++* First version revised B. Removed the functions that compute mean with dispersion using unlifted types, because of numeric inaccuracy.
Numeric/Stats.hs view
@@ -30,13 +30,6 @@ where m0 !s3 !l2 !x = (s3 + x) / (l2 + 1) meanWithDispersion _ _ _ _ !m !d = (m,d) -meanWithDispersionF :: [Float] -> Float# -> Float# -> Float# -> Float# -> Float# -> (Float,Float)-meanWithDispersionF ((F# !x):xs) !s1 !s2 !l1 m1 d = - meanWithDispersionF xs (plusFloat# s1 x) (plusFloat# s2 (powerFloat# x 2.0#)) (plusFloat# l1 1.0#) (m0 s1 l1 x) - (m0 s2 l1 (minusFloat# (powerFloat# x 2.0#) (powerFloat# (m0 s1 l1 x) 2.0#)))- where m0 !s3 !l2 !x = (divideFloat# (plusFloat# s3 x) (plusFloat# l2 1.0#))-meanWithDispersionF _ _ _ _ !m !d = (F# m, F# d)- -- | A tail-recursive realization for the statistic mean. A variant of the 'mean2' function. mean :: RealFrac a => [a] -> a mean xs = mean2 xs 0.0 0.0 0.0@@ -50,7 +43,3 @@ meanWithDisp :: (RealFrac a, Floating a) => [a] -> (a,a) meanWithDisp xs = meanWithDispersion xs 0.0 0.0 0.0 0.0 0.0 {-# INLINE meanWithDisp #-}--meanWithDispF :: [Float] -> (Float, Float)-meanWithDispF xs = meanWithDispersionF xs 0.0# 0.0# 0.0# 0.0# 0.0#-{-# INLINE meanWithDispF #-}
uniqueness-periods-vector-stats.cabal view
@@ -2,7 +2,7 @@ -- For further documentation, see http://haskell.org/cabal/users-guide/ name: uniqueness-periods-vector-stats-version: 0.1.1.0+version: 0.1.2.0 synopsis: A very basic descriptive statistics. description: A very basic descriptive statistics. Functions use a tail recursion approach to compute the values and are strict by an accumulator. homepage: https://hackage.haskell.org/package/uniqueness-periods-vector-stats