The Museum of HP Calculators


MOD (Modulo) routine for the HP-32S(ii)

This program is by P. J. Schüngel and is used here by permission.

This program is supplied without representation or warranty of any kind. P. J. Schüngel and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Overview

Improved modulo routine for the 32S(ii). Also works on the 11C, 15C and 42S by using the rounding (RND) function. It does not use any storage registers and operates like a built-in function ie preserving Z and T. LASTX contains the unrounded value after completion. The only assumption is that the display format has to be compatible with the divisor.

Listing

M01 LBL M
M02 ÷
M03 LASTX
M04 x⇔y
M05 FP
M06 ×
M07 RND
M08 RTN

Go back to the software library
Go back to the main exhibit hall