You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attempt to create a symbolic function that prints with a name that is also used by a reserved GiNaC function results in unexpected behaviour when evaluating. The following should output x^2 but completely bypasses AFunction.eval:
If the name is however e.g. p2 then AFunction.eval gets called as expected. Compare the above with
...
sage: p2 = AFunction('p2', 2)
sage: p2(x)
x^2
This prevents creation of BuiltinFunctions as wrapper for functions reserved by Pynac with the same name like factorial (#17489), and forces every change into Pynac.
I came to this from #17489 when I tried to create a symbolic factorial function without usage of GinacFunction, which wreaks havoc when expression conversion to/from e.g. Maxima is involved.
The attempt to create a symbolic function that prints with a name that is also used by a reserved GiNaC function results in unexpected behaviour when evaluating. The following should output
x^2
but completely bypassesAFunction.eval
:If the name is however e.g.
p2
thenAFunction.eval
gets called as expected. Compare the above withThis prevents creation of
BuiltinFunction
s as wrapper for functions reserved by Pynac with the same name likefactorial
(#17489), and forces every change into Pynac.Component: symbolics
Issue created by migration from https://trac.sagemath.org/ticket/17547
The text was updated successfully, but these errors were encountered: