Handbook
Glossary
nan-sum ( seq -- n )
Vocabulary
math
.
extras
Inputs
seq
a
sequence
Outputs
n
a
number
Word description
Return the
sum
of
seq
treating any NaNs as zero.
Definition
USING:
kernel
math
sequences
;
IN:
math.extras
:
nan-sum
( seq -- n )
0
[
dup
fp-nan?
[
drop
]
[
+
]
if
]
binary-reduce
;