-
-
Notifications
You must be signed in to change notification settings - Fork 560
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
fix interface to maxima.product #17502
Comments
comment:1
Note that the same thing happens with
The problem is probably that these maxima routines aren't specially wrapped, so sage probably generates the following maxima session (roughly):
Sage doesn't know that the parameter in the second slot is "special": it needs to be a name, and maxima treats it as just a name. If we wrap "product" as we do with "sum" the problem will go away. Plus, in the process you'll see sums don't get evaluated via the string interface at all. |
comment:3
Shouldn't that be considered a Maxima bug (and reported to Maxima as such) ? |
This comment has been minimized.
This comment has been minimized.
comment:6
Extending That is clever for several reasons, and not problematic for "ordinary" functions, i. e. Lisp function that evaluate their arguments. But Maxima's
In other words, the second argument of Maxima's The same is probably true for other Maxima's special forms (e. g. I conclude that our current interface to Maxima is inadequate for special forms. I currently do not see how to determine at runtime if a given Maxima function is an ordinary function or a special form. We could try to build a "blacklist" of known special forms, associating each of them to a custom handler (i. e. a dictionary). This is probably a bit of heavy lifting, and better Python programmers than I am may have a better idea... If it turns out that there is a way to detect Maxima's special forms at runtime, another possible stopgap would be to raise an exception for any special form. Doesn't help much, but may at least avoid such nonsense as:
Should we ask |
That's plain wrong of course and is not what Maxima says on the command line. The second argument (the running variable) apparently is completely ignored.
The solution may depend on implementation of a symbolic product function.
See #22920 for the equivalent issue with sums.
CC: @kcrisman @EmmanuelCharpentier
Component: interfaces
Issue created by migration from https://trac.sagemath.org/ticket/17502
The text was updated successfully, but these errors were encountered: