Ticket #9706: trac_9706_chebyshev_docu.patch

File trac_9706_chebyshev_docu.patch, 4.4 KB (added by maldun, 8 years ago)

docu changes

  • sage/functions/orthogonal_polys.py

    # HG changeset patch
    # User Stefan Reiterer <domors@gmx.net>
    # Date 1386541142 -3600
    # Node ID 738e19cfa1802702b6f6e8c501efacd9022eb631
    # Parent  76e0bcf8d3bc159779269cb823abf4efd4bbfc33
    trac 9706: corrections in documentation, and references
    
    diff --git a/sage/functions/orthogonal_polys.py b/sage/functions/orthogonal_polys.py
    a b  
    270270
    271271REFERENCES:
    272272
    273 - [ASHandbook] Abramowitz and Stegun: Handbook of Mathematical Functions,
    274    http://www.math.sfu.ca/ cbm/aands/
     273.. [ASHandbook] Abramowitz and Stegun: Handbook of Mathematical Functions,
     274    http://www.math.sfu.ca/ cbm/aands/
    275275
    276 - :wikipedia:`Chebyshev_polynomials`
     276.. :wikipedia:`Chebyshev_polynomials`
    277277
    278 - :wikipedia:`Legendre_polynomials`
     278.. :wikipedia:`Legendre_polynomials`
    279279
    280 - :wikipedia:`Hermite_polynomials`
     280.. :wikipedia:`Hermite_polynomials`
    281281
    282 - http://mathworld.wolfram.com/GegenbauerPolynomial.html
     282.. http://mathworld.wolfram.com/GegenbauerPolynomial.html
    283283
    284 - :wikipedia:`Jacobi_polynomials`
     284.. :wikipedia:`Jacobi_polynomials`
    285285
    286 - :wikipedia:`Laguerre_polynomia`
     286.. :wikipedia:`Laguerre_polynomia`
    287287
    288 - :wikipedia:`Associated_Legendre_polynomials`
     288.. :wikipedia:`Associated_Legendre_polynomials`
    289289
    290 - [EffCheby] Wolfram Koepf: Effcient Computation of Chebyshev Polynomials
    291   in Computer Algebra
    292   Computer Algebra Systems: A Practical Guide.
    293   John Wiley, Chichester (1999): 79-99.
     290.. [EffCheby] Wolfram Koepf: Effcient Computation of Chebyshev Polynomials
     291    in Computer Algebra
     292    Computer Algebra Systems: A Practical Guide.
     293    John Wiley, Chichester (1999): 79-99.
    294294
    295295AUTHORS:
    296296
     
    424424
    425425    def _apply_formula_(self, *args):
    426426        """
    427         The Clenshaw method uses the three term recursion of the polynomial,
     427        Method which uses the three term recursion of the polynomial,
    428428        or explicit formulas instead of maxima to evaluate the polynomial
    429429        efficiently, if the `x` argument is not a symbolic expression.
    430         The name comes from the Clenshaw algorithm for fast evaluation of
    431         polynomials in chebyshev form.
    432430
    433431        EXAMPLES::
    434432
     
    456454
    457455    def _eval_(self, *args):
    458456        """
    459         The symbolic evaluation is either done with maxima, or with direct
    460         computaion in pynac.
    461 
    462         For the fast numerical evaluation, another method should be used.
    463         We use Clenshaw's algorithm, which uses the recursion.
    464         The function also checks for special values, and if
    465         the order is an integer and in range.
     457        The _eval_ method decides which evaluation suits best
     458        for the given input, and returns a proper value.
    466459       
    467460        EXAMPLES::
    468461
     
    736729       
    737730    def _apply_formula_(self,*args):
    738731        """
    739         Clenshaw method for :class:`chebyshev_T` (means use recursions in this
    740         case). This is much faster for numerical evaluation than maxima!
     732        Applies explicit formulas for :class:`chebyshev_T`.
     733        This is much faster for numerical evaluation than maxima!
    741734        See [ASHandbook]_ 227 (p. 782) for details for the recurions.
    742         See also [EffCheby] for fast evaluation techniques.
     735        See also [EffCheby]_ for fast evaluation techniques.
    743736
    744737        EXAMPLES::
    745738
     
    758751            return 1
    759752        if k == 1:
    760753            return x
    761 
    762         # TODO: When evaluation of Symbolic Expressions works better
    763         # use these explicit formulas instead!
    764         #if -1 <= x <= 1:
    765         #    return cos(k*acos(x))
    766         #elif 1 < x:
    767         #    return cosh(k*acosh(x))
    768         #else: # x < -1
    769         #    return (-1)**(k%2)*cosh(k*acosh(-x))
    770754       
    771755        help1 = 1
    772756        help2 = x
     
    885869       
    886870    def _apply_formula_(self,*args):
    887871        """
    888         Clenshaw method for :class:`chebyshev_U` (means we use the recursion)
     872        Applies explicit formulas for :class:`chebyshev_U`.
    889873        This is much faster for numerical evaluation than maxima.
    890874        See [ASHandbook]_ 227 (p. 782) for details on the recurions.
    891         See also [
     875        See also [EffCheby]_ for the recursion formulas.
    892876
    893877        EXAMPLES::
    894878
     
    11131097    Returns the generalized Laguerre polynomial for integers `n > -1`.
    11141098    Typically, `a = 1/2` or `a = -1/2`.
    11151099   
    1116     REFERENCE:
     1100    REFERENCES:
    11171101
    11181102    - Table on page 789 in [ASHandbook]_.
    11191103