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

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Prmtv  
#1 Posted : 08 September 2024 07:22:56(UTC)
Prmtv


Rank: Advanced Member

Groups: Registered
Joined: 14/07/2022(UTC)
Posts: 43
Man
Russian Federation

Hello!


1) Why is the result of the sum not 0?
2) Why do different sum options differ (red from blue)?


011210.PNG

sum.sm (16kb) downloaded 3 time(s).

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

Offline overlord  
#2 Posted : 08 September 2024 10:35:15(UTC)
overlord


Rank: Advanced Member

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

Was thanked: 530 time(s) in 356 post(s)
That number practically means zero to programming languages.
Decimal numbers stored in smath as fractions.
In each iteration a small decimal part can be leftover.
When they are collected it makes result away from zero.
Putting an eval() to your calculation makes your results even smaller.

Click to expand

Changing exponent threshold to bigger makes your results zero by the way.

Click to expand

Regards

Offline Prmtv  
#3 Posted : 08 September 2024 19:19:38(UTC)
Prmtv


Rank: Advanced Member

Groups: Registered
Joined: 14/07/2022(UTC)
Posts: 43
Man
Russian Federation

Originally Posted by: overlord Go to Quoted Post
That number practically means zero to programming languages.
Decimal numbers stored in smath as fractions.
In each iteration a small decimal part can be leftover.
When they are collected it makes result away from zero.
Putting an eval() to your calculation makes your results even smaller.

Click to expand

Changing exponent threshold to bigger makes your results zero by the way.

Click to expand

Regards



With further calculations, the program will perceive it like 0 or will an error accumulate?
Users browsing this topic
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.