#10072: Bug in log gamma evaluation
--------------------------------+-------------------------------------------
   Reporter:  kcrisman          |       Owner:  AlexGhitza
       Type:  defect            |      Status:  new       
   Priority:  major             |   Milestone:  sage-4.6.1
  Component:  basic arithmetic  |    Keywords:            
     Author:                    |    Upstream:  N/A       
   Reviewer:                    |      Merged:            
Work_issues:                    |  
--------------------------------+-------------------------------------------

Comment(by kcrisman):

 Replying to [comment:8 zimmerma]:
 > I don't see how the wrong result is related (if any) to the correct one.
 The difference in the
 > imaginary part is {{{1.70425232898877}}}, which is neither 2pi nor pi
 nor even pi/2.

 Correct.  My comment about the `2*pi` was in reference to the Ginac
 output, not the Sage output.  But I can't for the life of me figure out
 how Sage is actually doing `log_gamma(i).n()`, because the conversion to
 the complex field pretty clearly just converts it to a Ginac object and
 then numerically evaluates.

 As to the precision, I think there must be something missing in our code,
 because the Ginac docs state
 {{{
 The function evalf that was used above converts any number in GiNaC's
 expressions into floating point numbers. This can be done to arbitrary
 predefined accuracy:

      > evalf(1/7);
      0.14285714285714285714
      > Digits=150;
      150
      > evalf(1/7);
 0.1428571428571428571428571428571428571428571428571428571428571428571428
      5714285714285714285714285714285714285
 }}}
 So maybe we're not taking that into account, though I have no idea how I
 would do so.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10072#comment:9>
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