Bug (or wrong use?) of 'At()'

Bug (or wrong use?) of 'At()' - Inconsistent results - Messages

#1 Posted: 3/12/2019 6:54:06 AM
Johannes Piel

Johannes Piel

1 likes in 19 posts.

Group: User

Hi,
I starting with smath and still try easy examples.
Is found the results of at() to be inconstistent,
but it may be an bad understandig. Could someone review
my appended file?
Many thanks, Johannes

Bug in at.sm (20 KiB) downloaded 33 time(s).
#2 Posted: 3/12/2019 7:08:03 AM
Davide Carpi

Davide Carpi

1415 likes in 2872 posts.

Group: Moderator

It is by design. If you give multiple replacement rules for the same variable ( x=a then x=b ) only the first is used (tbf there's no filter on how many times you can enter the same variable name on the LHS, thus the function tries even to evaluate x in b, but x doesn't exists anymore since is already evaluated in a)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Posted: 3/12/2019 7:12:20 AM
Johannes Piel

Johannes Piel

1 likes in 19 posts.

Group: User

But why is it different for the two definitions of L?

Or does it look equal for you? (Than it may only occur for me.)
#4 Posted: 3/12/2019 7:23:08 AM
Davide Carpi

Davide Carpi

1415 likes in 2872 posts.

Group: Moderator

Sorry, I'm on a linux machine right now and I missed a part of the document, my comment was about the first yellow region without maxima.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#5 Posted: 3/12/2019 8:35:59 AM
Johannes Piel

Johannes Piel

1 likes in 19 posts.

Group: User

Here comes an image. This may show up differences with smath or maxima versions.
Bug in at.png
#6 Posted: 3/12/2019 8:51:00 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

L is differently defined in the two versions (use the dynamic assistant by mouse hovering over the definitions to see the difference)

in the second case, L isnt't stored in evaluated shape, thus vectorize() doesn't recognise the expression as vector and executes the expression only once.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#7 Posted: 3/12/2019 9:24:44 AM
Johannes Piel

Johannes Piel

1 likes in 19 posts.

Group: User

OK. I see.
But how can i get L stored in evaluated shape?

In your example:

MK example.png

it works nice.

If i try the same

Bug in at II.png

it does not. Did i miss an configuration?
#8 Posted: 3/12/2019 10:19:30 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

it does not. Did i miss an configuration?


... plot first, solve(,,,,) native Smath.

Plot1rst.PNG

#9 Posted: 3/12/2019 10:35:02 AM
Johannes Piel

Johannes Piel

1 likes in 19 posts.

Group: User

This is the numerical solution.
My question is about assignin symbolic results.
In the example you see mkraska using L:=Solve(,), and assigning the results.
In my try, you see the result is not assigned as expected,
last line shows
x.1= x=result
but it should be
x.1=result.
#10 Posted: 3/12/2019 11:40:18 AM
Johannes Piel

Johannes Piel

1 likes in 19 posts.

Group: User

I found the difference between Program Versions.
I tried V0.99.6884 and all works as expected.
L is now assigned identically for both definitions.
The bug may be not located in at().

Bug in at V6884.png
#11 Posted: 3/12/2019 12:21:16 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

It seems that the evaluation logic in the plug-in interface has changed.
The function Solve() indeed shows a different behaviour (not evaluated/simplified when used in definitions, as if it was behind a line operator)
Other functions like int() don't seem to be affected by the problem.

Blatt39.png
Blatt39.sm (6 KiB) downloaded 36 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#12 Posted: 3/12/2019 4:53:29 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

This is the numerical solution.
My question is about assignin symbolic results.
In the example you see mkraska using L:=Solve(,), and assigning the results.
In my try, you see the result is not assigned as expected,


Users keep complaining about Maxima from SS versions/versions.
Maple/Smath are more stable companions.

f(x)_g(x).PNG

#13 Posted: 3/12/2019 6:02:12 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote


Users keep complaining about Maxima from SS versions/versions.
Maple/Smath are more stable companions.



Jean, I know that many users don't care, but once you vote for maple, can you tell me under what license it is distributed?
Is it legally safe to use it in public service like university? Can it be recommended under the light of respect for IP?


Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#14 Posted: 3/12/2019 9:32:35 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Jean, I know that many users don't care, but once you vote for maple, can you tell me under what license it is distributed?
Is it legally safe to use it in public service like university? Can it be recommended under the light of respect for IP?


Martin, you have several specific questions that only Andrey can answer.
Maxima was formerly MacSyma, originally piloted by the MIT, conjointly
MIT/University of Toronto. MIT pedaled too long in butter, so that this
branch of research founded itself "Maple Waterloo".
Most of the stuff was borrowed from book.
My understanding is that: part of Maple is courtesy to Smath whereas
Smath is freeware. Viacheslav is the guru Maple/Smath, is it ?
Probably same as the Matlab "mwXXX" ... odesolvers ... etc.

Jean
#15 Posted: 3/12/2019 11:45:34 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi. The line statement seems to correct all issues, except the vectorization one.

Clipboard01.gif

Best regards.
Alvaro.
  • New Posts New Posts
  • No New Posts No New Posts