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 Davide Carpi  
#1 Posted : 28 May 2013 11:54:29(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
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... Wacko


best regards,

w3b5urf3r

Edited by user 28 May 2013 11:59:59(UTC)  | Reason: Not specified

File Attachment(s):
eval.sm (9kb) downloaded 16 time(s).
Davide Carpi attached the following image(s):
SMath Studio - [eval.sm].png
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects

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

Offline omorr  
#2 Posted : 28 May 2013 14:17:01(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
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!"
Offline Davide Carpi  
#3 Posted : 28 May 2013 15:46:09(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
Originally Posted by: omorr Go to Quoted Post
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...
File Attachment(s):
eval.sm (45kb) downloaded 17 time(s).
Davide Carpi attached the following image(s):
SMath Studio - [eval.sm]_2.png
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline omorr  
#4 Posted : 28 May 2013 16:29:26(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Sorry, Davide - I do not get it Sorry

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



Regards,
Radovan

Edited by user 28 May 2013 16:31:13(UTC)  | Reason: Not specified

File Attachment(s):
eval-1.sm (45kb) downloaded 20 time(s).
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Davide Carpi  
#5 Posted : 28 May 2013 16:47:26(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
Originally Posted by: omorr Go to Quoted Post
Sorry, Davide - I do not get it Sorry

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

Originally Posted by: omorr Go to Quoted Post
And where all those fractions come from. I delete them, press equal to - and got the fixed/exponential numbers Umnik
me too... SMath 0.96.4884 on my notebook... Wonder

Edited by user 29 May 2013 22:10:02(UTC)  | Reason: Not specified

Davide Carpi attached the following image(s):
resource.ashx.png
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline omorr  
#6 Posted : 29 May 2013 11:26:54(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Ah that ...Shok Like I was blind, I did not pay attention on this Wallbash

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

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline mkraska  
#7 Posted : 29 May 2013 16:07:43(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,990
Germany

Was thanked: 1128 time(s) in 724 post(s)
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...

Edited by user 29 May 2013 16:12:20(UTC)  | Reason: Not specified

File Attachment(s):
eval-frac.sm (92kb) downloaded 18 time(s).
mkraska attached the following image(s):
fract.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 2 users thanked mkraska for this useful post.
on 29/05/2013(UTC),  on 29/05/2013(UTC)
Offline Davide Carpi  
#8 Posted : 29 May 2013 16:49:39(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
Originally Posted by: mkraska Go to Quoted Post
The trouble comes from the fractions setting in the context menu


Clap

thank you very much Martin, this solve my issue shown here (2nd post); the global fractions setting was switched from "Numeric" to "Auto"... Air kiss Biggrinancer: Dance Thank you
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
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.