<div dir="ltr"><div>Title says it all. </div><div><br></div><div>Thanks</div><div><br></div><div>Lawson </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><ul style="color:rgb(0,0,0);font-family:Times"><li></li></ul><hr style="color:rgb(0,0,0);font-family:Times"><pre style="color:rgb(0,0,0)">On 10.02.2015, at 13:39, David T. Lewis &lt;<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-dev">lewis at mail.msen.com</a>&gt; wrote:
&gt;<i> 
</i>&gt;<i> On Tue, Feb 10, 2015 at 02:39:19AM -0700, Lawson English wrote:
</i>&gt;&gt;<i> This bit of code fails at numb := 1024:
</i>&gt;&gt;<i> 
</i>&gt;&gt;<i> error: Cannot truncate this number
</i>&gt;&gt;<i> 
</i>&gt;&gt;<i> numb := 1024.
</i>&gt;&gt;<i> 1 to: numb do: [:n||test| test:=(2 raisedTo: n) -1. (test isPrime) 
</i>&gt;&gt;<i> ifTrue: [Transcript show: n; tab; show: test;cr]]
</i>&gt;&gt;<i> 
</i>&gt;&gt;<i> #isProbablyPrime fails with the same number.
</i>&gt;&gt;<i> 
</i>&gt;&gt;<i> 
</i>&gt;&gt;<i> numb := 1023.
</i>&gt;&gt;<i> works for both.
</i>&gt;&gt;<i> 
</i>&gt;<i> 
</i>&gt;<i> It looks like a problem in random number generation. It is failing in
</i>&gt;<i> LargePositiveInteger&gt;&gt;atRandom which somehow results in the random
</i>&gt;<i> generator producing a value of Float infinity.
</i>&gt;<i> 
</i>&gt;<i> Dave
</i>
Yep. Random&gt;&gt;nextInt: does not work for really large ints. Fixed in Kernel-bf.899.

- Bert -
</pre><div><br></div></blockquote></div>