I am writing a little library with some prime number related methods. As I\'ve done the groundwork (aka working methods) and now I\'m looking for some optimization. Ofcours
Try the sieve of eratosthenes -- that should take out getting the root and floating point issues.
As for the floor, you will be better served by taking the ceiling.
floor
ceiling