Example Program to calculate Factorial
|
02-09-2018, 01:04 AM
(This post was last modified: 02-09-2018 01:05 AM by Gerson W. Barbosa.)
Post: #38
|
|||
|
|||
RE: Example Program to calculate Factorial
(02-08-2018 08:04 PM)Gene Wrote: Factorial for the SR-56. Takes 14 steps out of 100. Thats' an interesting efficiency aspect vs. the HP 25, etc. When I started using calculators, factorial was not an issue as they all had it built-in. The HP-15C which replaced my TI-59 even had Gamma! The HP-25C is tricky because of the number-entry bug (or feature) and the lack of x<=y test. The only 10-step program I came up with is not practical as it won’t work for arguments that are results of an operation. Code:
0 R/S -> 1.00 1 R/S -> 1.00 5 R/S -> 120.00 but 5 ENTER R/S -> 1.00 On a 25C, I would use this one instead: Code:
Why is 6 afraid of 7? 6 R/S 7 R/S * 10 R/S - -> 0 No, not because of that :-) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)