LF: PRIME NUMBERS!
[Prev][Next][Index][Thread]
LF: PRIME NUMBERS!
The built in function factor essentially does this.
i.e.
input "enter a number",n
if instring(string(factor(n)),"*") then
disp "not a prime"
else
disp "prime"
endif
I'm not sure what the usefulness of iterating through the prime numbers is,
although even a ti-basic version of the sieve of erastothenes shouldn't be
all that slow.
-Kevin
khuber@mr.net
that1guy@juno.com writes:
> Could someone PLEASE write a Prime-Number finder for Fargo... Nothing
> fancy at all, just something that will handle big numbers. I wrote one
> for ti-basic, but it goes SO SLOW! I think this would be perfect for ASM
> becuase it goes so fast.
References: