Tropical algebra overloading: Difference between revisions
Content added Content deleted
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.
math.order present prettyprint sequences ;
ALIAS: ⊕ max
ALIAS: ⊗ +
: ↑ ( x y -- z )
dup { [ dup truncate number= ] [ 0 > ] } 1&&
[ "Second arg must be positive integer." throw ] unless * ;
: show ( quot -- )
|