The result of the sum

The result of the sum - Сообщения

#1 Опубликовано: 08.09.2024 01:22:56
Prmtv

Prmtv

0 сообщений из 49 понравились пользователям.

Группа: User

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 (15 КиБ) скачан 58 раз(а).
#2 Опубликовано: 08.09.2024 04:35:15
overlord

overlord

554 сообщений из 1333 понравились пользователям.

Группа: Moderator

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

#3 Опубликовано: 08.09.2024 13:19:38
Prmtv

Prmtv

0 сообщений из 49 понравились пользователям.

Группа: User

Wrote

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?
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений