#12448: The binomial implementation does a quotient of gamma values, which is 
wrong
------------------------------------+---------------------------------------
       Reporter:  Snark             |         Owner:  AlexGhitza
           Type:  defect            |        Status:  needs_work
       Priority:  minor             |     Milestone:            
      Component:  basic arithmetic  |    Resolution:            
       Keywords:                    |   Work issues:            
Report Upstream:  N/A               |     Reviewers:            
        Authors:                    |     Merged in:            
   Dependencies:                    |      Stopgaps:            
------------------------------------+---------------------------------------

Comment (by Snark):

 There are several things to say about the matter:
 1. for m an integer, indeed the formula you give is correct.
 2. but it's possible to define the binomial with m non-integer using
 gamma-functions, and I think that's what the one who coded the current
 floating code had in mind.
 3. my patch is about partially unwinding the gamma factors like you
 mention (with step by step simplification which avoids overflows) before
 finally calling the gamma function with small parameters.
 4. but my patch should only start looping when the parameters are indeed
 big (or it will be slow) and use symmetry so
 binomial(float(1001),float(1)) works.

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