Ticket #9706: trac_9706_bugfixes_and_doctests.patch

File trac_9706_bugfixes_and_doctests.patch, 1.6 KB (added by maldun, 7 years ago)

incorporated things that were already been done ...

  • sage/functions/orthogonal_polys.py

    # HG changeset patch
    # User Stefan Reiterer <domors@gmx.net>
    # Date 1386287563 -3600
    # Node ID 2419063308f41fb294d04b917d1d1184ed876526
    # Parent  c57955ea781aacef10b68fd62a630bcea5fb3986
    Trac 9706: Some bugfixes and doctests added
    
    diff --git a/sage/functions/orthogonal_polys.py b/sage/functions/orthogonal_polys.py
    a b  
    316316#*****************************************************************************
    317317
    318318from sage.misc.sage_eval import sage_eval
    319 from sage.rings.all import ZZ
     319from sage.rings.all import ZZ, RR
    320320from sage.calculus.calculus import maxima
    321321
    322322
     
    474474            64*x^7 - 112*x^5 + 56*x^3 - 7*x
    475475            sage: chebyshev_T(3/2,x)
    476476            chebyshev_T(3/2, x)
     477            sage: parent(chebyshev_T(4, RIF(5)))
     478            Real Interval Field with 53 bits of precision
    477479        """
    478480        if not is_Expression(args[0]):
    479481            if not is_Expression(args[-1]) and is_inexact(args[-1]):
    480482                try:
    481483                    import sage.libs.mpmath.all as mpmath
    482                     return self._evalf_(*args)
     484                    step_parent = parent(args[-1])
     485                    return step_parent(self._evalf_(*args))
    483486                except AttributeError:
    484487                    pass
    485488                except mpmath.NoConvergence:
     
    631634            -3363.00000000000
    632635            sage: chebyshev_T(5,0.3).n()
    633636            0.998880000000000
     637            sage: chebyshev_T(1/2, 0)
     638            0.707106781186548
    634639        """
    635640        try:
    636641            step_parent = kwds['parent']