<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 4: Permutation does not iterate over whole set</title><link>https://sourceforge.net/p/probstat/bugs/4/</link><description>Recent changes to 4: Permutation does not iterate over whole set</description><atom:link href="https://sourceforge.net/p/probstat/bugs/4/feed.rss" rel="self"/><language>en</language><lastBuildDate>Wed, 17 Jan 2007 18:02:38 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/probstat/bugs/4/feed.rss" rel="self" type="application/rss+xml"/><item><title>Permutation does not iterate over whole set</title><link>https://sourceforge.net/p/probstat/bugs/4/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I'm not getting complete permutations. if I try to get all of the permutations of the numbers from 1 to 14, using a simple script, it terminates early.  I've tried this on fc5 native and fc6 as a vmware guest and get the same result. it appears to stop cleanly, just early.&lt;/p&gt;
&lt;p&gt;Have I built the code wrongly or something? I took that standard _0.912 tarball. I cannot even work out how to debug this. The reproduceability on different platforms makes me think it's an overflow problem, but I don't see anything obvious in that loop value. I see no symptoms of memory leakage.&lt;/p&gt;
&lt;p&gt;this program:&lt;/p&gt;
&lt;p&gt;---cut here---&lt;br /&gt;
import probstat&lt;/p&gt;
&lt;p&gt;values = [i+1 for i in range (14)]&lt;/p&gt;
&lt;p&gt;gen = probstat.Permutation (values)&lt;br /&gt;
loop = 1&lt;br /&gt;
for i in gen:&lt;br /&gt;
if loop %1000000 == 0: print loop&lt;br /&gt;
loop += 1&lt;/p&gt;
&lt;p&gt;-- cut here --&lt;br /&gt;
stops after it has printed 1278000000.  loop is 1278945281, i is:&lt;br /&gt;
[1, 4, 11, 2, 8, 7, 13, 14, 12, 5, 9, 6, 10, 3]&lt;/p&gt;
&lt;p&gt;loop should be around 87 billion, not 1.27 billion&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Coote</dc:creator><pubDate>Wed, 17 Jan 2007 18:02:38 -0000</pubDate><guid>https://sourceforge.net354c31833b44ea0c0dab274fae704fcb1d07bce9</guid></item></channel></rss>