Tropical algebra overloading: Difference between revisions

→‎{{header|Factor}}: second arg to exponentiation must be a positive integer
m (→‎{{header|Factor}}: change names, tweak output)
(→‎{{header|Factor}}: second arg to exponentiation must be a positive integer)
Line 33:
=={{header|Factor}}==
{{works with|Factor|0.99 2021-06-02}}
<lang factor>USING: combinators.short-circuit io kernel math math.order present prettyprint sequences ;functions
math.order present prettyprint sequences ;
 
ALIAS: ⊕ max
ALIAS: ⊗ +
 
ALIAS: ↑ *
: ↑ ( x y -- z )
dup { [ dup truncate number= ] [ 0 > ] } 1&&
[ "Second arg must be positive integer." throw ] unless * ;
 
: show ( quot -- )
1,808

edits