ireal-0.1: Real numbers and intervals with not so inefficient exact arithmetic.

Safe HaskellNone
LanguageHaskell98

Data.Number.IReal.FoldB

Synopsis

Documentation

foldb :: (a -> a -> a) -> a -> [a] -> a Source

Balanced fold, minimizing depth of call tree. Assumes associative operator. Often much more efficient than foldl/foldr when type a is IReal and the list is long.

foldb1 :: (a -> a -> a) -> [a] -> a Source

Balanced fold for associative operator over non-empty list.

bsum :: Num a => [a] -> a Source

Balanced sum, reorganized for (much) better efficiency when type a is IReal and the list is long.

foldb' :: (a -> a -> a) -> a -> [a] -> a Source

isumN' :: Integer -> [IReal] -> IReal Source

1st arg should be length of 2nd arg.