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 omorr  
#1 Posted : 08 May 2013 10:27:34(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)
Hello,

I would like someone to try to reproduce this (v.096 Stable and Night Build).

-Open both files "No_units_used.sm" and "Units_dont_mathc.sm" in the same instance of SMath using File|Open (not doubleclick on them)
-Then just recalculate. The strange "Units don't match" error will appear on the "Units_dont_mathc.sm". Look at the pictures please.
-If you open only the "Units_dont_mathc.sm" then everything is OK.
-If you just open only "Units_dont_mathc.sm" everything is Ok. Therefore, it seems that "No_units_used.sm" is the cause of problem.

In those files there are no units used (or at least I am not aware of that)

Regards,
Radovan

Edited by user 08 May 2013 11:38:58(UTC)  | Reason: Not specified

File Attachment(s):
No_units_used.sm (17kb) downloaded 24 time(s).
Units_dont_match.sm (26kb) downloaded 25 time(s).
omorr attached the following image(s):
Units_dont_match-OK.png
Units_dont_match-wrong.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
thanks 1 user thanked omorr for this useful post.
on 23/05/2013(UTC)

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

Offline Davide Carpi  
#2 Posted : 23 May 2013 13:30:56(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)
Just to update this thread...

Here there is a file made with SMath 0.95 (1st screenshot) by omorr; the example show the bug directly (no needs to open a couple of files) in the root() function (SMath 0.96.4884 - 2nd screenshot) but I've noticed the same issue trying solving this problem using my Nonlinear Solvers, so I suppose it's something deep outside the root() code...


best regards,

w3b5urf3r

Edited by user 23 May 2013 13:38:48(UTC)  | Reason: Not specified

File Attachment(s):
Primer44w-1.sm (31kb) downloaded 19 time(s).
Davide Carpi attached the following image(s):
SMath Studio - [Primer44w-1.sm].png
SMath Studio - [Primer44w-1.sm]_2.png
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 2 users thanked Davide Carpi for this useful post.
on 23/05/2013(UTC),  on 23/05/2013(UTC)
Offline Davide Carpi  
#3 Posted : 23 May 2013 21:44:12(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: w3b5urf3r_reloaded Go to Quoted Post
I've noticed the same issue trying solving this problem using my Nonlinear Solvers


After a little "debug session" using the Nonlinear Solvers Broyden() function as reference, seems that the issue is related to the eval function ...

I attach here a screenshot of the code.. at the first loop the variables are those shown in the 2nd screenshot; the stack function doesn't cause issues, but enabling/disabling the eval the error disappear (at least for this piece of code)...

Hope this will be useful for Andrey


best regards,

w3b5urf3r

Edited by user 23 May 2013 23:51:02(UTC)  | Reason: Not specified

Davide Carpi attached the following image(s):
NonlinearSolvers - SharpDevelop_2.png
SMath Studio - [Primer44w-1.sm].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 : 23 May 2013 21:53:34(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)
Hello w3b5urf3r,

Try this please.

- Use the recent v0.96.4884. Open the sm file from this post ( broyden-method.sm ). Everything should be fine. Than close it.

- Open the above mentioned file ( Primer44w-1.sm ), then open ( broyden-method.sm ). Now, ( broyden-method.sm ) will fail with "Units don't match" (units wern't used).

- Now,without closing either of the two files, remove eval() from ( broyden-method.sm ) in the function definition - three commands

h:eval(-B*f(x0))

z:eval(f(x)-f(x0))

B:eval(B-{(B*z-h)*transpose(h)*B}/el((transpose(h)*B*z),1))

Now, function call will work and the results will be obtained. But, strangely, you can not get the numerical values of the function f(), only symbolical - see the first picture please.

Save the corrected ( broyden-method.sm )and close SMath. Reopen SMath and open just ( broyden-method.sm ). Now, everyrhing is fine (the second picture) Shok

Regards,
Radovan

Edited by user 23 May 2013 22:08:46(UTC)  | Reason: Not specified

File Attachment(s):
Broyden-method.sm (19kb) downloaded 14 time(s).
Broyden-method-bug.sm (19kb) downloaded 13 time(s).
omorr attached the following image(s):
Broyden-method-bug.png
Broyden-fine.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Davide Carpi  
#5 Posted : 23 May 2013 23:49:40(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)
Confirmed (by opening the files in the same instance of SMath using File|Open or by dragging the 2nd file on the canvas); this confirms in some way the eval() role in this bug...

best regards,

w3b5urf3r

Edited by user 23 May 2013 23:55:49(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 24/05/2013(UTC)
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.