"TI-92 Plus and TI-89 family start the same way, except that they stop this trial division after trial divisor 1021". Although I have little experience with the NSpire, it would seem reasonable to me that if there is a limit of 10^13 for randint then there very well could be a similar limit for isPrime.

]]>This way i am trying to generate primes of, say 100 digits in a resenable time for encription.

this is the code

`Define findprime(dig)= Func loop dig:=round(((dig)/(10)),0) prime:="" For a,1,dig prime:=prime&string(randInt(10^(9),10^(10)-1)) EndFor prime:=expr(prime) If isPrime(prime)=true Then Return prime Goto end EndIf endloop Lbl end EndFunc`

and this is the error i get

Domain error

An argument must be in a specified domain.

]]>