Feature SS-4651
1 vote

[CustomFunctions] Maxima style substitution for at()

Created by Martin Kraska on 11/14/2020 7:12 PM Last Updated by Martin Kraska on 2/11/2021 1:05 PM
%
 (hrs)
Logged: 0   (hrs)

 Description

I'd recommend to implement the Maxima style behaviour or to issue a warning if the same variable name appears on the LHS and on the RHS in any of the given equations.

I think I encountered this problem in the past but could not find any related post in the BTS or in the Forum.

    Martin Kraska (Thursday, February 11, 2021 1:05 PM) #

I again found an old worksheet corrupted by the silent changes in the behaviour of at(). As this is not obvious for the user, I urgently recommend to at least issue an error message, if any target variable is also used on the sources side of the substitution. Perhaps include the hint to rename the culprit.

Here we see the problem:

This is how to fix it with the given version of at()

 

    Davide (Sunday, November 15, 2020 9:11 PM) #

Thank you Martin. Currently at() uses the built-in API features, so it is like if you write the definition on the canvas and then the function is evaluated. Previously it worked with bruteforce replacements, but it had some downsides. I'll check if I make it working as expected, I have an idea.