nan-max ( seq -- n ) (original) (raw)

nan-max ( seq -- n )

Vocabulary
math.extras

Inputs

seq a sequence

Outputs

n a number

Word description
Return the maximum of seq ignoring any NaNs.

Definition

USING: math sequences ;

IN: math.extras

: nan-max ( seq -- n ) [ fp-nan? ] reject maximum ;