eval() behavior

eval() behavior - Сообщения

#1 Опубликовано: 28.05.2013 04:54:29
Davide Carpi

Davide Carpi

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

Группа: Moderator

Hi all,

I noticed that the output of the eval() function is related in some way to the decimal places setting... Don't know if it's a bug or a feature, but seem it's not a rule (see the screenshot)
IMHO it's preferable to cancel this behavior...


best regards,

w3b5urf3r
eval.sm (8 КиБ) скачан 33 раз(а).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#2 Опубликовано: 28.05.2013 07:17:01
Radovan Omorjan

Radovan Omorjan

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

Группа: Moderator

I might not quite understand your point, but I think this is a matter of rounding to some number of decimal places and it is ok with me when I put 1.05 and us 1 decimal place to see: 1.05=1

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Опубликовано: 28.05.2013 08:46:09
Davide Carpi

Davide Carpi

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

Группа: Moderator

Wrote

I might not quite understand your point, but I think this is a matter of rounding to some number of decimal places and it is ok with me when I put 1.05 and us 1 decimal place to see: 1.05=1

Regards,
Radovan



I'm not sure...
eval.sm (44 КиБ) скачан 39 раз(а).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#4 Опубликовано: 28.05.2013 09:29:26
Radovan Omorjan

Radovan Omorjan

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

Группа: Moderator

Sorry, Davide - I do not get it

And where all those fractions come from. I delete them, press equal to - and got the fixed/exponential numbers

[albumimg]186[/albumimg]

Regards,
Radovan
eval-1.sm (44 КиБ) скачан 36 раз(а).
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#5 Опубликовано: 28.05.2013 09:47:26
Davide Carpi

Davide Carpi

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

Группа: Moderator

Wrote

Sorry, Davide - I do not get it


Maybe I'm wrong in my first post, but I don't understand from where the values in the red boxes comes

Wrote

And where all those fractions come from. I delete them, press equal to - and got the fixed/exponential numbers

me too... SMath 0.96.4884 on my notebook... o_o

resource.ashx.png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#6 Опубликовано: 29.05.2013 04:26:54
Radovan Omorjan

Radovan Omorjan

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

Группа: Moderator

Ah that ... Like I was blind, I did not pay attention on this

I just hope that this is only in presenting the numbers, and should not influence on some calculation behavior - I hope .

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#7 Опубликовано: 29.05.2013 09:07:43
Martin Kraska

Martin Kraska

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

Группа: Moderator

The trouble comes from the fractions setting in the context menu and how it is processed.
If you switch to decimal, then everything is fine. Default setting is "auto". If set to "fraction", then odd fractions are generated, which are far from minimal (or just correct) representations of the given number.

Also, for more clarity, I switched on the display of trailing zeros.

EDIT: line 8 is same as line 7, sorry, but you still get the point...
fract.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 пользователям понравился этот пост
Davide Carpi 29.05.2013 09:30:00, Radovan Omorjan 29.05.2013 09:58:00
#8 Опубликовано: 29.05.2013 09:49:39
Davide Carpi

Davide Carpi

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

Группа: Moderator

Wrote

The trouble comes from the fractions setting in the context menu





thank you very much Martin, this solve my issue shown here (2nd post); the global fractions setting was switched from "Numeric" to "Auto"...
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений