HP-15C time calculating program
|
08-30-2024, 04:06 PM
(This post was last modified: 08-30-2024 04:54 PM by C.Ret.)
Post: #5
|
|||
|
|||
RE: HP-15C time calculating program
Yes, indeed it is very tempting to use a modulo of 12 to simplify the code.
But a modulo of 12 returns numbers between 0 and 11. Here, we need an interval between 1 and 12. A small shift can do the trick in a minimum of steps: Code: 001-42,21,11 f LBL A f FIX 4 12 STO 0 for 12-O'Clock systems (Alternatively 24 STO 0 for 24hr dial systems). 1 STO 1 for 1 - 12 hours range (Alternatively 0 STO 1 for 0-23 range display). 4.3400 g →H STO f I to get 4 h 34 min 00 second reacting length time. Usage: Enter starting time and press f A, the HP-15C display the ending time. Examples: Typical 12-hour clock system: 12 STO 0, 1 STO 1, 4.34 g →H STO f I 7 f A ⇒ 11.3400 7.30 f A ⇒ 12.0400 8 f A ⇒ 12.3400 8.23 f A ⇒ 12.5700 8.3015 f A ⇒ 1.0415 9 f A ⇒ 1.3400 9.4523 f A ⇒ 2.1923 11.15 f A ⇒ 3.4900 12.05 f A ⇒ 4.3900 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HP-15C time calculating program - lomchivok - 08-29-2024, 05:48 PM
RE: HP-15C time calculating program - Thomas Klemm - 08-30-2024, 03:42 AM
RE: HP-15C time calculating program - lomchivok - 09-04-2024, 06:17 PM
RE: HP-15C time calculating program - Werner - 08-30-2024, 12:50 PM
RE: HP-15C time calculating program - Thomas Klemm - 08-30-2024, 02:25 PM
RE: HP-15C time calculating program - C.Ret - 08-30-2024 04:06 PM
RE: HP-15C time calculating program - Werner - 08-30-2024, 04:13 PM
|
User(s) browsing this thread: 4 Guest(s)