Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello, This is some minor issues about operators and assignment in SMath. Here are some examples: {{a←5}/{b←a+1}}/{c←b+4} ======== sqrt({aa←100}/{cc←800})======== det({v←110}/{u←1000})======== They reported "Division by zero." error but the assigment is performed and every variables has their values. For instance, try to use matrix operator and fill the placeholders with asignments. No error reported, but assignmnets are performed. I do not know what to think about it. This might just be ignored (no harm done) or just force SMath to supress this. What others think about it? Regards, Radovan Edited by user 28 July 2010 09:55:42(UTC)
| Reason: Not specified |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 04/07/2010(UTC) Posts: 178 Was thanked: 19 time(s) in 13 post(s)
|
The examples you show are not critical because the division by zero seems to suppress any result of the operator. I could not get the sqrt of aa/cc with the "=" key. However a more critical case is shown in the example below where the result is incorrect. |
Ed |
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Yes, I agree. However, I still do not have any definite opinion about this. Here is another example, symilar to yours. No errors reported as well. As you would expect variable "x" to have value of 10, I would expect some other values for the variables in this example. I do not know how to explain this and how is this actually working. On the other hand, I think it might be useful if the results would be predictible. Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
Hello. This is a bug. Definition operator should return the right side of expression, so in answer for "x" should be 10. Regards.
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello Andrey, Just one more comment - hope you would not mind. This syntax is incorrect (error message): a←b←5With this one the syntax is correct but gives problematic and questionable results: a←(b←5)a=0 b=5In the first place, I was thinking that multiple assignments are problematic but I remembered that, i.e., this is quite correct: SMath must have multiple assignments in the same math region. On the other hand I commented the issue about "local" and "global" variables - problematic "line" environment in few posts: http://en.smath.info/forum/default.aspx?g=posts&m=3113#post3113http://en.smath.info/forum/default.aspx?g=posts&m=3114#post3114Then I remembered that Mathcad does not allow multiple assignments. I suppose because of the similar problems. In Mathcad inside the "line" blocks there are "local assignments" - left arrow character - used instead ordinary (:=) assignment operator. However, I would like very much SMath to have the functionality of multiple functions with "line" and programming (above are the mentioned posts about the present situation). At the moment I do not know how to deal with it. I feel that the solution is right there and SMath is close to it. Of course, this is just my impression. Regards, Radovan Edited by user 29 July 2010 11:14:54(UTC)
| Reason: Not specified |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
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.