Example Program to calculate Factorial
|
02-01-2018, 08:06 PM
Post: #12
|
|||
|
|||
RE: Example Program to calculate Factorial
... and HP-12C version in engineer style:
The core is 3 steps: Code: 01: LN Preparation for use required to clear statistics registers, store your number (N) in R1, then goto the start of program memory, run the program and you'll get the -LN(N!) in R2. You can get N! if you type Code: RCL 2 If you like waste some memory you can program it fully (9 steps): Code: 01: STO 1 Use: 1.) f CLEAR \GS 2.) f CLEAR PRGM 3.) Type N 4.) R/S Benchmark: 69! = 1.711224655E99, running time: 62 secs on "classic" 12C Made in Brazil (S/N: 3107B...) Some hints are welcome to optimize the code (twisted GTO 07/02 really terrible) Csaba |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)