Jump to content

Modular arithmetic: Difference between revisions

no edit summary
(Adding the Forth solution)
No edit summary
Line 557:
MI{ 3 7 } 50 ^ = MI{ 2 7 }
</pre>
=={{header|Forth}}==
<pre>
\ We would normally define operators that have a suffix `m' in order
\ not be confused: +m -m *m /m **m
Line 607 ⟶ 608:
10 DUP 100 ** + 1 + . CR
 
</pre>
 
=={{header|Go}}==
Go does not allow redefinition of operators. That element of the task cannot be done in Go. The element of defining f so that it can be used with any ring however can be done, just not with the syntactic sugar of operator redefinition.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.