#11476: PartitionTuples.cardinality has problems
---------------------------------+------------------------------------------
       Reporter:  pdehaye        |         Owner:  sage-combinat
           Type:  defect         |        Status:  new          
       Priority:  major          |     Milestone:  sage-5.4     
      Component:  combinatorics  |    Resolution:               
       Keywords:                 |   Work issues:               
Report Upstream:  N/A            |     Reviewers:               
        Authors:                 |     Merged in:               
   Dependencies:                 |      Stopgaps:               
---------------------------------+------------------------------------------

Comment (by andrew.mathas):

 This seems to be a bug in pari. I found a web page a few weeks ago
 suggesting that this might be an integer overflow problem in  pari, but I
 have not succeeded in finding this page now... I have emailed the pari
 support group to ask them about it.

 This failure appears much earlier than the example above suggests:

 {{{
 sage: PartitionTuples(17,2).cardinality()
 ...
 TypeError: unable to convert x (=  ***   at top-level:
 polcoeff(1/eta(x)^2,
   ***                 ^--------------------
   *** polcoeff: non existent component in truecoeff.) to an integer
 }}}

 If you run pari natively you get the error more quickly:

 {{{
 Desktop: sage -gp
                               GP/PARI CALCULATOR Version 2.5.2
 (development git-b703ee3)
                              i386 running darwin (x86-64/GMP-5.0.2 kernel)
 64-bit version
                                         compiled: Sep 12 2012, gcc-4.6.3
 (GCC)
                                     (readline v6.2 enabled, extended help
 enabled)

                                         Copyright (C) 2000-2011 The PARI
 Group

 PARI/GP is free software, covered by the GNU General Public License, and
 comes WITHOUT ANY WARRANTY WHATSOEVER.

 Type ? for help, \q to quit.
 Type ?12 for how to get moral (and possibly technical) support.

 parisize = 8000000, primelimit = 500509
 ? polcoeff(1/eta(x)^2, 16, x)
 %1 = 5822
 ? polcoeff(1/eta(x)^2, 17, x)
   ***   at top-level: polcoeff(1/eta(x)^2,
   ***                 ^--------------------
   *** polcoeff: non existent component in truecoeff.
   ***   Break loop: type 'break' to go back to GP
 }}}

 This is a little surprising as the number of 2-tuples of partitions adding
 to 17 is 8470, which isn't that big.

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