(15C) Decimal to x/16
|
09-25-2015, 04:10 PM
Post: #2
|
|||
|
|||
RE: HP 15C: Decimal to x/16
That's a nice program. Here's a variant that is a little shorter and uses only one register:
Code: 001-42,21,11 LBL A The numerator and denominator are merged into a single number nn.dd. Thus we can divide both by 2 with a single instruction. The display settings aren't changed since the function INT(x + 0.5) is used to round a number. The stack is filled with 0.5 in lines 4-7 because this number can be used often. Personally I dislike that 16 occurs twice but I couldn't come up with a better solution. Maybe somebody else can? Kind regards Thomas |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(15C) Decimal to x/16 - Dwight Sturrock - 09-24-2015, 11:56 PM
RE: HP 15C: Decimal to x/16 - Thomas Klemm - 09-25-2015 04:10 PM
RE: HP 15C: Decimal to x/16 - Dwight Sturrock - 09-26-2015, 02:11 PM
|
User(s) browsing this thread: 2 Guest(s)