Liking cljdoc? Tell your friends :D

sicmutils.util.aggregate

Utilities for aggregating sequences.

Utilities for aggregating sequences.
raw docstring

kahan-sumclj/s

(kahan-sum)
(kahan-sum [sum c] x)

Implements a fold that tracks the summation of a sequence of floating point numbers, using Kahan's trick for maintaining stability in the face of accumulating floating point errors.

Implements a fold that tracks the summation of a sequence of floating point
numbers, using Kahan's trick for maintaining stability in the face of
accumulating floating point errors.
sourceraw docstring

scanning-sumclj/s

(scanning-sum xs)
(scanning-sum f low high)

Returns every intermediate summation from summing either:

  • a series xs of numbers, or
  • the result of mapping function f to (range low high)

Using Kahan's summation trick behind the scenes to keep floating point errors under control.

Returns every intermediate summation from summing either:

- a series `xs` of numbers, or
- the result of mapping function `f` to `(range low high)`

Using Kahan's summation trick behind the scenes to keep floating point errors
under control.
sourceraw docstring

sumclj/s

(sum xs)
(sum f low high)

Sums either:

  • a series xs of numbers, or
  • the result of mapping function f to (range low high)

Using Kahan's summation trick behind the scenes to keep floating point errors under control.

Sums either:

- a series `xs` of numbers, or
- the result of mapping function `f` to `(range low high)`

Using Kahan's summation trick behind the scenes to keep floating point errors
under control.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close