On Tue, Feb 10, 2015 at 02:39:19AM -0700, Lawson English wrote:
> This bit of code fails at numb := 1024:
>
> error: Cannot truncate this number
>
> numb := 1024.
> 1 to: numb do: [:n||test| test:=(2 raisedTo: n) -1. (test isPrime)
> ifTrue: [Transcript show: n; tab; show: test;cr]]
>
> #isProbablyPrime fails with the same number.
>
>
> numb := 1023.
> works for both.
>
It looks like a problem in random number generation. It is failing in
LargePositiveInteger>>atRandom which somehow results in the random
generator producing a value of Float infinity.
Dave