Changes between Version 4 and Version 5 of Ticket #17547


Ignore:
Timestamp:
07/09/15 08:33:09 (7 years ago)
Author:
rws
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17547

    • Property Summary changed from BuiltinFunction overriding GiNaC function is allowed to BuiltinFunction overriding GiNaC function
  • Ticket #17547 – Description

    v4 v5  
     1The 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`:
    12{{{
    23sage: from sage.symbolic.function import BuiltinFunction
     
    1112e^x
    1213}}}
    13 If the name is e.g. `p2` `AFunction.eval` gets called, but not with name equal to a function provided with GiNaC. Compare the above with
     14If the name is however e.g. `p2` then `AFunction.eval` gets called as expected. Compare the above with
    1415{{{
    1516...
     
    1819x^2
    1920}}}
    20 The attempt at creation should give an error (plus respective documentation warnings).
    21 
    22 Alternatively, search first for user-defined function names, then GiNaC core, to allow overriding.
     21This prevents creation of `BuiltinFunction`s as wrapper for functions reserved by Pynac with the same name like `factorial` (#17489), and forces every change into Pynac.