SMath Studio Forum
»
SMath Studio
»
Questions
»
Poor symbolic simplification of index operations
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,985 Was thanked: 1124 time(s) in 721 post(s)
|
SMath can simplify expressions involving index operations, as the example shows. This, however, is limited to expressions with units. It doesn't work for general variables. This also affects the work of Maxima plugin ( see bug report), because things like unevaluated linear indexing propagate to Maxima instead of being handled inside SMath Studio. Is there any reason for disabling this feature? How can I enforce evaluation? I'd expect the same structure of the results no matter if a or 'm is used. In both cases all expressions are evaluated symbolically. indexing1.sm (18kb) downloaded 13 time(s). |
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Originally Posted by: mkraska SMath can simplify expressions involving index operations, as the example shows. This, however, is limited to expressions with units. It doesn't work for general variables. This also affects the work of Maxima plugin ( see bug report), because things like unevaluated linear indexing propagate to Maxima instead of being handled inside SMath Studio. Is there any reason for disabling this feature? How can I enforce evaluation? I'd expect the same structure of the results no matter if a or 'm is used. In both cases all expressions are evaluated symbolically. Hi Martin. I ask the same thing some time ago and the answer was that unevaluated expressions are not assumed as complex values like maple and others, but as general arrays. You can write your own simplification routine for convert some expression in what you want. Hope this helps. indexing1.sm (35kb) downloaded 23 time(s).Best regards. Alvaro.
|
6 users thanked Razonar for this useful post.
|
on 19/11/2019(UTC), on 19/11/2019(UTC), on 20/11/2019(UTC), on 20/11/2019(UTC), on 20/11/2019(UTC), on 20/11/2019(UTC)
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: mkraska How can I enforce evaluation?
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,985 Was thanked: 1124 time(s) in 721 post(s)
|
Originally Posted by: Razonar
Hi Martin. I ask the same thing some time ago and the answer was that unevaluated expressions are not assumed as complex values like maple and others, but as general arrays.
You can write your own simplification routine for convert some expression in what you want.
Hope this helps.
Best regards. Alvaro.
Hi Alvaro, your command of equrep() is really impressive and I hope that some of the stuff you designed will make it into SMath core. As to assuming any undefined variable being an array, this is neither really implemented nor is it useful IMHO. The following would be wrong if a and b were matrices (or whatever arrays), given that multiplication isn't by element. Please, dear developers, don't take that as a request to suppress the last bit of symbolic simplification! I'd prefer the scalar assumption, perhaps augmented by some way to mark undefined variables as arrays. Examples would be underline or overarrow, perhaps the number of markers indicating the order (one underline - vector, two underlines - matrix). I guess that 99% of the users would expect undefined variables to be scalars. |
|
4 users thanked mkraska for this useful post.
|
on 20/11/2019(UTC), on 20/11/2019(UTC), on 20/11/2019(UTC), on 20/11/2019(UTC)
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: mkraska I guess that 99% of the users would expect undefined variables to be scalars For sure 'scalar' for Quick plot [ln(x)], Thus will support all Smath more scalar maths .
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
Poor symbolic simplification of index operations
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.