1 Pages (5 items)
Units don't match - but units not used? - Some kind of peculiar behavior with units - Messages
#1 Posted: 5/8/2013 3:27:34 AM
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

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

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 users liked this post
Davide Carpi 5/23/2013 7:46:00 AM
#2 Posted: 5/23/2013 6:30:56 AM
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
Primer44w-1.sm (30 KiB) downloaded 135 time(s).
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
Primer44w-1.sm (30 KiB) downloaded 135 time(s).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
2 users liked this post
#3 Posted: 5/23/2013 2:44:12 PM
WroteI'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
![SMath Studio - [Primer44w-1.sm].png](/en-US/files/Download/46rgbB/SMath-Studio---[Primer44w-1.sm].png)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#4 Posted: 5/23/2013 2:53:34 PM
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
[MATH=eng]h:eval(-B*f(x0))[/MATH]
[MATH=eng]z:eval(f(x)-f(x0))[/MATH]
[MATH=eng]B:eval(B-{(B*z-h)*transpose(h)*B}/el((transpose(h)*B*z),1))[/MATH]
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)
Regards,
Radovan

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
[MATH=eng]h:eval(-B*f(x0))[/MATH]
[MATH=eng]z:eval(f(x)-f(x0))[/MATH]
[MATH=eng]B:eval(B-{(B*z-h)*transpose(h)*B}/el((transpose(h)*B*z),1))[/MATH]
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)

Regards,
Radovan

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#5 Posted: 5/23/2013 4:49:40 PM
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
best regards,
w3b5urf3r
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
Radovan Omorjan 5/24/2013 12:53:00 AM
1 Pages (5 items)
-
New Posts
-
No New Posts