Handbook
Glossary
kahan-sum ( seq -- n )
Vocabulary
math
.
extras
Inputs
seq
a
sequence
Outputs
n
a
float
Word description
Calculates the summation of the sequence using the Kahan summation algorithm.
Definition
USING:
kernel
math.extras.private
sequences
;
IN:
math.extras
:
kahan-sum
( seq -- n )
[
0.0 0.0
]
dip
[
kahan+
]
each
nip
;