On Monday, June 13, 2016 at 12:28:11 AM UTC+2, Paul Masson wrote: > > 1) How a function is made symbolic as opposed to a Python callable >
Builtin functions are callable classes deriving from Function, see symbolic/function.pyx They are created on start up. Most symbolic objects have a C++ layer that resides in Pynac, this applies to functions as well. The anonymous functions you get with "f(x)=" are NewSymbolicFunctions and are handled differently than BuiltinFunctions but both are in the same registry. See also http://trac.sagemath.org/wiki/symbolics/functions 2) The process for evaluating a symbolic function numerically > Regardless of how a builtin function is written the first stab at evaluation is done in symbolic/function.pyx by trying if the function argument has a member function with the same name, e.g. sin(RR(.1)) tries RR(.1).sin() and so on. If that is not successful, the function object's _eval_ and _evalf_() members are tried. In case of GinacFunctions this is C++ code which, for FP evaluation, atm calls Python functions (this is where the bug was fixed). Another example is at the bottom of https://github.com/pynac/pynac/wiki/%7C-functions So, we have Pynac for speed of symbolic manipulations, which must call Python/Cython to create numeric Python objects. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.