All pastes #736222 Raw Edit

arithmetic max

public text v1 · immutable
·published 2007-10-14 10:28 UTC
rendered paste body
REQUIRE /TEST ~profit/lib/testing.f

: max 2DUP + -ROT - ABS + 2/ ;

/TEST
REQUIRE TESTCASES ~ygrek/lib/testcase.f 

TESTCASES max testing
(( 10 3 max -> 10 ))
(( 9 10 max -> 10 ))
(( -4 10 max -> 10 ))
(( -3 -5 max -> -3 ))
END-TESTCASES