Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline overlord  
#1 Posted : 01 April 2021 21:35:44(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,126
Turkey

Was thanked: 507 time(s) in 338 post(s)
Is this a bug or calculation limitation?

Regards

euler.sm (11kb) downloaded 10 time(s).

2021-04-01_21-33.png

Edited by user 01 April 2021 21:41:23(UTC)  | Reason: Not specified

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Razonar  
#2 Posted : 02 April 2021 00:38:23(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Hi overlord. It's a numerical round-off issue. For example you can get the same issue in excel, with more or less same values.

round-off-error.pdf (205kb) downloaded 14 time(s).

Some few notes:
- You can estimate the error for floating point arithmetic. For that you can check almost any numerical methods undergraduate page or book. Also can check this article in the wikipedia: Loss of significance.
- The primary way is just know the "exact" value and compare it the obtained. That's one big application of your code for the extended arithmetic.
- One reason for use books like Numerical Recipes in C and similar is that one assume that the algorithms in the book are optimized for minimize those errors. For instance, in the order of the arithmetic.
- This kind of errors make more pedagogical to study first numerical algorithms for integration and then derivatives, and sometimes the function evaluation. Here an example of the Numerical Recipes in C index

Clipboard01.jpg

Best regards.
Alvaro.

Edited by user 02 April 2021 00:45:18(UTC)  | Reason: Not specified

thanks 1 user thanked Razonar for this useful post.
on 02/04/2021(UTC)
Offline overlord  
#3 Posted : 02 April 2021 01:48:02(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,126
Turkey

Was thanked: 507 time(s) in 338 post(s)
Originally Posted by: Razonar Go to Quoted Post
Hi overlord. It's a numerical round-off issue. For example you can get the same issue in excel, with more or less same values.

Best regards.
Alvaro.

Thank you Alvaro,

I had only checked this formula only with wolframalpha website.
On it, there were no issues, everything was smooth.
Then I tried it with SMath and get those results.
After your post I calculated with Mathcad and Mathematica.
Results are worse over them. Mathematica can not calculate after exp(7).
On Mathcad results have same spike and they are settled on 1 after it.
So this is basically a limitation. No need to investigate further.

Best regards to you Razonar,
Thanks again.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.