Tropical algebra overloading: Difference between revisions

m
m (R example)
m (→‎{{header|R}}: use cat)
Line 108:
}
 
print(pastecat("2 %*% -2 ==", 2 %*% -2), "\n")
print(pastecat("-0.001 %+% -Inf ==", 0.001 %+% -Inf), "\n")
print(pastecat("0 %*% -Inf ==", 0 %*% -Inf), "\n")
print(pastecat("1.5 %+% -1 ==", 1.5 %+% -1), "\n")
print(pastecat("-0.5 %*% 0 ==", -0.5 %*% 0), "\n")
print(pastecat("5^7 ==", 5 %^% 7), "\n")
print(pastecat("5 %*% (8 %+% 7)) ==", 5 %*% (8 %+% 7)), "\n")
print(pastecat("5 %*% 8 %+% 5 %*% 7 ==", 5 %*% 8 + 5 %*% 7), "\n")
</lang>{{out}}
<pre>
4,105

edits