Calculate large factorials on a HP48 (SysRPL)
|
02-18-2014, 10:32 PM
Post: #1
|
|||
|
|||
Calculate large factorials on a HP48 (SysRPL)
It's nice to see that some of you want learn or want to have a look inside SysRPL. One idea was using SysRPL for speed up calculation speed, here's another approach using SysRPL. This is an example from my fund I wrote years ago.
What is 253! = 5.17346099264E499 And what is 254! = ! Error: Overflow The easy way to solve this, instead of multiplying the numbers, simply add the logarithm to the base 10 of each number. This is the UserRPL code doing this: Code:
But calculate 10! with this program and you see the disadvantage of this method: inaccuracy! A solution for this is using the internal data type "long real". This SysRPL program using the same algorithm like before. Because the logarithm to the base 10 don't exist for long real I use the natural logarithm function %%LN. Here's the source code for compiling with HPTOOLS: Code:
So back to the entire question, what is 254! = "1.31405909214E502". For single step execution of SysRPL programs on the HP48 I prefer Jazz. Hope you enjoy, Christoph |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Calculate large factorials on a HP48 (SysRPL) - Christoph Giesselink - 02-18-2014 10:32 PM
RE: Calculate large factorials on a HP48 (SysRPL) - Werner - 02-19-2014, 10:45 AM
RE: Calculate large factorials on a HP48 (SysRPL) - Christoph Giesselink - 02-19-2014, 04:44 PM
RE: Calculate large factorials on a HP48 (SysRPL) - walter b - 02-19-2014, 11:45 AM
RE: Calculate large factorials on a HP48 (SysRPL) - Gerson W. Barbosa - 02-19-2014, 01:21 PM
RE: Calculate large factorials on a HP48 (SysRPL) - Dieter - 02-20-2014, 06:22 PM
RE: Calculate large factorials on a HP48 (SysRPL) - Dieter - 02-23-2014, 04:33 PM
|
User(s) browsing this thread: 2 Guest(s)