The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Don't trust MS Excel when it comes to accuracy
06-04-2023, 04:42 PM
Post: #1
Don't trust MS Excel when it comes to accuracy
So, I found out that MS Excel has the GammaLN function.
In the WP43 manual, there is an example on how to use the GammaLN to calculate really large Factorials (X!).

Both Excel and Libreoffice Calc claims to have 15 digits accuracy. Not remotely as accurate as SM/WP calcs, of course.

Anyway, just to test the routine, I dialled in GammaLN(51) in order to calculate 50!.
While the corrct answer, confirmed with both Free/Plus42 and WP43, is about 3,041409320171338x10^64, Excel comes up with 3,0044...x10^64.
Libreoffice comes up with: 3,04140932017131x10^64.
Notice that the last digit (1, instead of 3) is incorrect. Excel cr*pped out at the second digit..

Code used for the routine:
GammaLN(51)/LN(10)
FP
10^FP

Or, to put it in RPN routine:
Code:

LBL 'BigFac'
1
+
lnGamma
10
ln
/
Enter
IP
x><Y
FP
10^x
RTN
END
Note that this code works on WP43 or C47
The "1+" is so that you insert the number you would factorial (Gamma+1=X!).

Esben
15C CE, 28s, 35s, 49G+, 50G, Prime G2 HW D, SwissMicros DM32, DM42, DM42n, WP43 Pilot
Elektronika MK-52 & MK-61
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Don't trust MS Excel when it comes to accuracy - DA74254 - 06-04-2023 04:42 PM



User(s) browsing this thread: 1 Guest(s)