[SS-2340] user-defined order of computation ignored

[SS-2340] user-defined order of computation ignored - matrices & vectors - 消息

#1 已发布: 2016/5/9 10:59:24
Tirastriel

Tirastriel

0个赞,共2个帖子。

组: User

Here is in attachment files illustrating wrong computation of local variable.
Using version 0.98 (build: 5935)

bug.sm (7.04 KiB)已下载 1374 次。
bug.png
#2 已发布: 2016/5/9 11:12:24
Mike Kaganski

Mike Kaganski

184个赞,共434个帖子。

组: User

scrH40.png

Seems that it incorrectly optimizes the order of evaluation (despite brackets explicitly set).
This looks like a bug.

Aside, please note that this may be simplified like at the top of the screenshot.

Submitted SS-2340

A workaround:
scrH41.png

And BTW, you may rewrite your Module() like this:
scrH42.png

because scalar multiplication of vectors is sum of products of their corresponding elements multiplied by cos of angle between them - and for identical vectors, cosine is 1.
С уважением, Михаил Каганский
1位用户喜欢此帖子
Davide Carpi 2016/5/9 11:48:00
#3 已发布: 2016/5/9 13:20:20
Tirastriel

Tirastriel

0个赞,共2个帖子。

组: User

Thanks for quick answer with tips, I'll use it
#4 已发布: 2016/5/9 22:38:11
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Define as function for greater functionality/elegance.

Forum Igor.gif
#5 已发布: 2016/5/11 00:32:06
Basile

Basile

8个赞,共172个帖子。

组: User

Jean,

Are you using matrices curved lines?
I get squares.
smath error 01.JPG

Thanks,
Basile
#6 已发布: 2016/5/11 11:54:12
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

Jean,

Are you using matrices curvedlines?
I get squares.



Basile,

I'm at Smath 5346. The matrix square bracket came recently
with some of the latest nightly build. Smath 5346 does not
have the matrix square bracket, which I love very much.
The 2nd level bracket in formula is still missing [I think ?].

Cheers, Jean



#7 已发布: 2016/5/11 23:55:16
Basile

Basile

8个赞,共172个帖子。

组: User

Jean,

Any idea why does not evaluate but gives error message?

Basile
#8 已发布: 2016/5/12 00:08:22
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

Jean,

Any idea why does not evaluate but gives error message?

Basile



...as it looks there is a pair of missing brackets in eval(,)

Jean

Forum Basile.gif
#9 已发布: 2016/5/12 04:34:02
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: Moderator

More or less is the same bug... the preprocessing now simplify the expression (affects only the last version)

0.98.5973

2016-05-12 09_33_39-SMath Studio Desktop - [bug.sm_].png

previous versions

2016-05-12 09_28_29-SMath Studio Desktop - [bug.sm_].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
  • 有新帖
  • 无新帖