#6961: provide wrapper for psi function of GiNaC
---------------------------------------------------+------------------------
   Reporter:  burcin                               |       Owner:               
                 
       Type:  enhancement                          |      Status:  
positive_review               
   Priority:  major                                |   Milestone:  sage-4.3.3   
                 
  Component:  symbolics                            |    Keywords:  psi, gamma, 
digamma, polygamma
     Author:  Burcin Erocal                        |    Upstream:  N/A          
                 
   Reviewer:  Karl-Dieter Crisman, Ross Kyprianou  |      Merged:               
                 
Work_issues:  needs rebase on top of #6207         |  
---------------------------------------------------+------------------------
Changes (by rossk):

  * keywords:  => psi, gamma, digamma, polygamma
  * reviewer:  => Karl-Dieter Crisman, Ross Kyprianou
  * status:  needs_review => positive_review


Comment:

 {{{
 sage: diff(gamma(x),x)/gamma(x) # definition of digamma (or "psi")
 psi(x)

 sage: diff(gamma(x),x).subs(x=1)
 -euler_gamma

 sage: psi(1)
 -euler_gamma

 # analytical result
 sage: psi(1/2)
 -euler_gamma - 2*log(2)

 # numerical examples
 sage: psi(.5)
 -1.96351002602142

 sage: psi(.5r)
 -1.9635100260214233

 sage: psi(complex(.5))
 (-1.9635100260214233+0j)

 # 1st argument means 0'th derivative (so psi(0, x) = psi(x))
 sage: psi(0, .5)
 psi(0.500000000000000)

 sage: N(psi(0, .5))
 -1.96351002602142
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6961#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to