Skip to content

convert not coerce padics symbolic function arguments #17790

@rwst

Description

@rwst

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.

CC: @jdemeyer

Component: symbolics

Author: Ralf Stephan

Branch/Commit: u/rws/builtinfunction_doesn_t_pass_non_sr_coercible_arguments_to_function_code @ e4a30b6

Issue created by migration from https://trac.sagemath.org/ticket/17790

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions