Opened 23 months ago

#24603 new defect

chebyshev_T/U fail with float/complex argument

Reported by: rws Owned by:
Priority: major Milestone: sage-8.2
Component: symbolics Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

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'

Change History (0)

Note: See TracTickets for help on using tickets.