CEESxMOD—Modular arithmetic

CEESxMOD performs the mathematical function modular arithmetic by using the equation:
Equation for modular arithmetic
The expression parm1(modulo parm2) is defined as follows, with the brackets indicating an integer part:

That is, the largest integer whose magnitude does not exceed the magnitude of parm1/parm2 is used.

The sign of the integer is the same as the sign of
The following routines are provided for the various data types supported:
CEESIMOD
32-bit binary integer
CEESSMOD
32-bit single floating-point number
CEESDMOD
64-bit double floating-point number
CEESQMOD
128-bit extended floating-point number
Read syntax diagramSkip visual syntax diagram
Syntax

>>-CEESxMOD--(--parm1--,--parm2--,--fc--,--result--)-----------><

parm1 (input)
The first parameter to the modular arithmetic routine. The input range is not restricted.
parm2 (input)
The second parameter to the modular arithmetic routine. The input range is: parm2 is not equal to 0.

If parm2 = 0, the modulus routine is undefined. In addition, a divide exception is recognized and an interrupt occurs.

fc (output)
A 12-byte feedback code, optional in some languages, that indicates the result of this service. If you choose to omit this parameter, refer to Invoking callable services for the appropriate syntax to indicate that the feedback code was omitted.

The following symbolic conditions can result from this service:

Code Severity Message number Message text
CEE000 0 The service completed successfully.
result (output)
The result of the mod routine. The output range is:
Result of the mod routine