<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 <<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-dev">lewis at mail.msen.com</a>> wrote:
><i>
</i>><i> On Tue, Feb 10, 2015 at 02:39:19AM -0700, Lawson English wrote:
</i>>><i> This bit of code fails at numb := 1024:
</i>>><i>
</i>>><i> error: Cannot truncate this number
</i>>><i>
</i>>><i> numb := 1024.
</i>>><i> 1 to: numb do: [:n||test| test:=(2 raisedTo: n) -1. (test isPrime)
</i>>><i> ifTrue: [Transcript show: n; tab; show: test;cr]]
</i>>><i>
</i>>><i> #isProbablyPrime fails with the same number.
</i>>><i>
</i>>><i>
</i>>><i> numb := 1023.
</i>>><i> works for both.
</i>>><i>
</i>><i>
</i>><i> It looks like a problem in random number generation. It is failing in
</i>><i> LargePositiveInteger>>atRandom which somehow results in the random
</i>><i> generator producing a value of Float infinity.
</i>><i>
</i>><i> Dave
</i>
Yep. Random>>nextInt: does not work for really large ints. Fixed in Kernel-bf.899.
- Bert -
</pre><div><br></div></blockquote></div>