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 
Free42 possible accuracy flaw
03-22-2022, 12:33 PM
Post: #1
Free42 possible accuracy flaw
I may have identified an accuracy flaw in the power operation in Free42/Decimal.

This came from the last [VA] SRC #010 - Pi Day 2022 Special thread where a calculation done by two methods gave significantly different results, with no clear explanation.

I found a problem with this calculation:
(1+1/X)^X [1]
with X=1E8.
A comparison with the expended and mathematically equivalent expression:
exp( X * ln(1+1/X) ) [2]
gives the following results
[1] 2.718281814867636217652977244308419
[2] 2.718281814867636217652977243009177

Although we could expect expression [2] to be less accurate due to the intermediate calculations, it turns out that result [2] is correct (according to Wolfram reference) and result [1] is in error in its last 7 digits.

Checked on latest Free42 3.0.10.

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Free42 possible accuracy flaw - J-F Garnier - 03-22-2022 12:33 PM
RE: Free42 possible accuracy flaw - Werner - 03-23-2022, 07:30 AM
RE: Free42 possible accuracy flaw - Werner - 03-23-2022, 08:49 AM
RE: Free42 possible accuracy flaw - Werner - 03-25-2022, 07:03 AM
RE: Free42 possible accuracy flaw - Werner - 03-30-2022, 08:04 AM
RE: Free42 possible accuracy flaw - Werner - 03-25-2022, 08:53 AM



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