#17790: BuiltinFunction doesn't pass non-SR-coercible arguments to function code
-------------------------+----------------------------
   Reporter:  rws        |            Owner:
       Type:  defect     |           Status:  new
   Priority:  major      |        Milestone:  sage-6.5
  Component:  symbolics  |         Keywords:
  Merged in:             |          Authors:
  Reviewers:             |  Report Upstream:  N/A
Work issues:             |           Branch:
     Commit:             |     Dependencies:
   Stopgaps:             |
-------------------------+----------------------------
 This affects authors of function code but shows also in:
 {{{
 sage: binomial(Qp(5)(8),3)
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 <ipython-input-1-43da6d5c56db> in <module>()
 ----> 1 binomial(Qp(Integer(5))(Integer(8)),Integer(3))

 /home/ralf/sage/src/sage/symbolic/function.pyx in
 sage.symbolic.function.GinacFunction.__call__
 (build/cythonized/sage/symbolic/function.cpp:9048)()
     842             (0, Integer Ring)
     843         """
 --> 844         res = super(GinacFunction, self).__call__(*args, **kwds)
     845
     846         # Convert to Integer if the output was of type "int" and
 any of

 /home/ralf/sage/src/sage/symbolic/function.pyx in
 sage.symbolic.function.BuiltinFunction.__call__
 (build/cythonized/sage/symbolic/function.cpp:10572)()
     991             res = self._evalf_try_(*args)
     992             if res is None:
 --> 993                 res = super(BuiltinFunction, self).__call__(
     994                         *args, coerce=coerce, hold=hold)
     995

 /home/ralf/sage/src/sage/symbolic/function.pyx in
 sage.symbolic.function.Function.__call__
 (build/cythonized/sage/symbolic/function.cpp:6301)()
     485                             nargs[i] = SR.coerce(carg)
     486                         except Exception:
 --> 487                             raise TypeError, "cannot coerce
 arguments: %s"%(err)
     488                 args = nargs
     489         else: # coerce == False

 TypeError: cannot coerce arguments: no canonical coercion from 5-adic
 Field with capped relative precision 20 to Symbolic Ring
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/17790>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to