-
-
Notifications
You must be signed in to change notification settings - Fork 601
solve() breaks substitute_function() #17504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
comment:2
I think the problem here is that we can't really support/recognize the "nargs" argument, but we do have:
When we see the symbol appear on the maxima side, we have no idea whether it's a variadic function or one with a fixed number of arguments. Apparently, the interface presently chooses to go with variadic, since that is most generic. Indeed, if you change the first line to
there is no problem. Further problems arise with bare functions, because that concept doesn't exist in the maxima interface and/or maxima itself:
|
comment:3
Wouldn't it be best to record what symbols sage is sending to maxima, and translate symbols in maxima's output back to the same things they corresponded to in the input? |
comment:4
Replying to @sagetrac-wonder:
We do that to some extent, but lack of scoping makes this unpredictable:
Since we're already mangling names for variables, one possibility would be to mangle any attributes into the names of functions, in which we'd get something along the lines:
|
comment:5
I see, yeah.
Maybe streamlined by only using mangled names for non-variadic functions. Or only when a function comes up whose simple name is already in use... |
Seems like this should work differently:
I believe it should replace
z(x)
withx^2
in the last result.CC: @sagetrac-jakobkroeker
Component: symbolics
Issue created by migration from https://trac.sagemath.org/ticket/17504
The text was updated successfully, but these errors were encountered: