Modular arithmetic: Difference between revisions

Content added Content deleted
Line 558: Line 558:
</pre>
</pre>
=={{header|Forth}}==
=={{header|Forth}}==
Contrary to other contributions, this present a modular package that is complete, i.e. they contain a full set of operators, notably division.
It relies not on a library supplied with Forth, but presents the implementation, defined using only Forth kernel definitions.
<pre>
<pre>
\ We would normally define operators that have a suffix `m' in order
\ We would normally define operators that have a suffix `m' in order
Line 604: Line 606:
' /m ALIAS /
' /m ALIAS /
' **m ALIAS **
' **m ALIAS **
' %:m ALIAS %:m


\ now the calculation becomes
\ now the calculation becomes