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: | Line 33: | ||
=={{header|Factor}}== |
=={{header|Factor}}== |
||
{{works with|Factor|0.99 2021-06-02}} |
{{works with|Factor|0.99 2021-06-02}} |
||
<lang factor>USING: io kernel math math. |
<lang factor>USING: combinators.short-circuit io kernel math math.functions |
||
math.order present prettyprint sequences ; |
|||
ALIAS: ⊕ max |
ALIAS: ⊕ max |
||
ALIAS: ⊗ + |
ALIAS: ⊗ + |
||
ALIAS: ↑ * |
|||
: ↑ ( x y -- z ) |
|||
dup { [ dup truncate number= ] [ 0 > ] } 1&& |
|||
[ "Second arg must be positive integer." throw ] unless * ; |
|||
: show ( quot -- ) |
: show ( quot -- ) |