(12C) Modulo, the financial way
|
05-06-2024, 07:19 PM
Post: #1
|
|||
|
|||
(12C) Modulo, the financial way
The modulo operation, sometimes called the 5th basic operation, returns the remainder of an integer division. Normally it is calculated as
a mod b = a - b×INT(a/b) which can be transformed into a program, in a rather conventional way: Code: 01 x<>y #t z b a On the other hand, as a financial calculator, we should be surprised if the HP12C wouldn't offer a financial way, too: Code: 01 f Clear FIN #clears all financial registers Usage: a ENTER b R/S Examples: 20 mod 7 = 6 200 mod 9 = 2 10 mod 6 = 4 40 mod 6 = 4 100 mod 6 = 4 1E9 mod 6 = 4 Have fun modulating numbers! (Summarised from my original post) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)