Skip to content

chebyshev_T/U fail with float/complex argument #24603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rwst opened this issue Jan 29, 2018 · 0 comments
Open

chebyshev_T/U fail with float/complex argument #24603

rwst opened this issue Jan 29, 2018 · 0 comments

Comments

@rwst
Copy link
Contributor

rwst commented Jan 29, 2018

sage: chebyshev_T(7, float(1.7))  

/home/ralf/sage/local/lib/python2.7/site-packages/sage/functions/orthogonal_polys.pyc in __call__(self, n, *args, **kwds)
    468                 pass
    469 
--> 470         return super(ChebyshevFunction,self).__call__(n, *args, **kwds)
    471 
    472     def _eval_(self, n, x):

/home/ralf/sage/local/lib/python2.7/site-packages/sage/functions/orthogonal_polys.pyc in __call__(self, *args, **kwds)
    423             return maxima(self._eval_(*args, **kwds))._sage_()
    424 
--> 425         return super(OrthogonalFunction,self).__call__(*args, **kwds)
    426 
    427 

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

/home/ralf/sage/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6786)()
    489                     (<Expression>args[0])._gobj, hold)
    490         elif self._nargs == 2:
--> 491             res = g_function_eval2(self._serial, (<Expression>args[0])._gobj,
    492                     (<Expression>args[1])._gobj, hold)
    493         elif self._nargs == 3:

/home/ralf/sage/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction._evalf_or_eval_ (build/cythonized/sage/symbolic/function.cpp:12969)()
   1080         res = self._evalf_try_(*args)
   1081         if res is None:
-> 1082             return self._eval0_(*args)
   1083         else:
   1084             return res

/home/ralf/sage/local/lib/python2.7/site-packages/sage/functions/orthogonal_polys.pyc in _eval_(self, n, x)
    513             if isinstance(x, Expression) and n.abs() < 32:
    514                 return self.eval_formula(n, x)
--> 515             return self.eval_algebraic(n, x)
    516 
    517         if isinstance(x, Expression) or isinstance(n, Expression):

/home/ralf/sage/local/lib/python2.7/site-packages/sage/functions/orthogonal_polys.pyc in eval_algebraic(self, n, x)
    775         if n < 0:
    776             return self._eval_recursive_(-n, x)[0]
--> 777         return self._eval_recursive_(n, x)[0]
    778 
    779     def _eval_recursive_(self, n, x, both=False):

/home/ralf/sage/local/lib/python2.7/site-packages/sage/functions/orthogonal_polys.pyc in _eval_recursive_(self, n, x, both)
    794 
    795         assert n >= 2
--> 796         a, b = self._eval_recursive_((n+1)//2, x, both or n % 2)
    797         if n % 2 == 0:
    798             return 2*a*a - 1, both and 2*a*b - x

/home/ralf/sage/local/lib/python2.7/site-packages/sage/functions/orthogonal_polys.pyc in _eval_recursive_(self, n, x, both)
    794 
    795         assert n >= 2
--> 796         a, b = self._eval_recursive_((n+1)//2, x, both or n % 2)
    797         if n % 2 == 0:
    798             return 2*a*a - 1, both and 2*a*b - x

/home/ralf/sage/local/lib/python2.7/site-packages/sage/functions/orthogonal_polys.pyc in _eval_recursive_(self, n, x, both)
    794 
    795         assert n >= 2
--> 796         a, b = self._eval_recursive_((n+1)//2, x, both or n % 2)
    797         if n % 2 == 0:
    798             return 2*a*a - 1, both and 2*a*b - x

/home/ralf/sage/local/lib/python2.7/site-packages/sage/functions/orthogonal_polys.pyc in _eval_recursive_(self, n, x, both)
    791         """
    792         if n == 1:
--> 793             return x, parent(x).one()
    794 
    795         assert n >= 2

AttributeError: type object 'float' has no attribute 'one'

Component: symbolics

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

@rwst rwst added this to the sage-8.2 milestone Jan 29, 2018
@mkoeppe mkoeppe removed this from the sage-8.2 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants