How it works
The
Instruction operation "remainder" performs an arithmetic modulus (remainder) across all the input parameters. Arithmetic is performed accumulatively first to last. Each subsequent input is mod'd from the result of the previous input calculation. Thefore it really only makes sense to have two inputs.
"Remainder" Examples
Simple Operation
This example shows a simple integer division: So 36 / 5 = 7 * 5 + 1 remainder = 1.
<instruction operation="remainder">
<input value="36" />
<input value="5" />
</instruction>
1
Remainder Multiplication
This example shows a simple integer multiplication by the remainder of a division:
So 38 / 5 = 3 * 5 = 15.
<instruction xmlns="http://www.obyx.org">
<input>
<instruction operation="multiply">
<input value="5" />
<input>
<instruction operation="remainder">
<input value="38" />
<input value="5" />
</instruction>
</input>
</instruction>
</input>
</instruction>
15
Last Modified: Thu, 15 Jan 2015