#17790: convert not coerce padics symbolic function arguments
-------------------------------------+-------------------------------------
       Reporter:  rws                |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.7
      Component:  symbolics          |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Ralf Stephan       |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  
u/rws/builtinfunction_doesn_t_pass_non_sr_coercible_arguments_to_function_code| 
 9a29cd1da4d4a7f974ba34c5d981a43802781294
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Description changed by tmonteil:

Old description:

> 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
> }}}

New description:

 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
 }}}

 test.

--

--
Ticket URL: <http://trac.sagemath.org/ticket/17790#comment:7>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to