Johannes, your prime numbers functions in your module is useful and it gives more than other languages gives if any. and we can use it from within thinbasic with more digits than normal, such as drawing primes spirals and more. it is said that prime numbers is a gold stones in the desert.
some times i am using a console program factor.exe from:
http://www.shamus.ie/uploads/File/factor.exe
http://www.shamus.ie
its usage can be like this factor.exe 123 >> result.txt
to output result to a text file, or without ">>" to output to screen
like
factor 201487636602438195784363
gives the result "this number is prime.
i forgot to say that with very big numbers the program hangs, or may continue to calculate for eternity as it should be with very big numbers, and the only way to stop is by ctrl-del-alt many times.