#13199: Use FLINT to compute the partition function
-------------------------------------+--------------------------------------
       Reporter:  fredrik.johansson  |         Owner:  sage-combinat
           Type:  enhancement        |        Status:  needs_review 
       Priority:  major              |     Milestone:  sage-5.4     
      Component:  combinatorics      |    Resolution:               
       Keywords:                     |   Work issues:               
Report Upstream:  N/A                |     Reviewers:  Andrew Mathas
        Authors:  Fredrik Johansson  |     Merged in:               
   Dependencies:  #12173             |      Stopgaps:               
-------------------------------------+--------------------------------------
Changes (by andrew.mathas):

  * reviewer:  => Andrew Mathas


Comment:

 I am happy to review this, although it is not clear to me what the status
 of #12173 is and until this patch is merged it seems rather cumbersome to
 load the current patch on top of #12173 in order play around with this
 patch and check to see that it actually works.

 Assuming that it is OK, I would like to see some more explicit tests
 inside the new number_of_partitions to show that it is working. I'd
 suggest simply reusing the ones that are in
 sage.combinat.partition.number_of_partitions. That is, adding the
 following tests to the doc-string for your number_of_partitions:
 {{{
         sage: from sage.combinat.partitions import number_of_partitions
         sage: number_of_partitions(3)
         3
         sage: number_of_partitions(10)
         42
         sage: number_of_partitions(40)
         37338
         sage: number_of_partitions(100)
         190569292
         sage: number_of_partitions(100000)
 
27493510569775696512677516320986352688173429315980054758203125984302147328114964173055050741660736621590157844774296248940493063070200461792764493033510116079342457190155718943509725312466108452006369558934464248716828789832182345009262853831404597021307130674510624419227311238999702284408609370935531629697851569569892196108480158600569421098519

     TESTS::

         sage: n = 500 + randint(0,500)
         sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0
         True
         sage: n = 1500 + randint(0,1500)
         sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0
         True
         sage: n = 1000000 + randint(0,1000000)
         sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0
         True
         sage: n = 1000000 + randint(0,1000000)
         sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0
         True
         sage: n = 1000000 + randint(0,1000000)
         sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0
         True
         sage: n = 1000000 + randint(0,1000000)
         sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0
         True
         sage: n = 1000000 + randint(0,1000000)
         sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0
         True
         sage: n = 1000000 + randint(0,1000000)
         sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0
         True
         sage: n = 100000000 + randint(0,100000000)
         sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0  #
 long time (4s on sage.math, 2011)
         True
 }}}

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