Prime number generator exercise
The major problem here is using imprecise floating point values. Not only does it slow the entire process (minor quibble), but it will produce incorrect results once the values pass the integral cutoff of the field width. If you truly want to allow calculations approaching infinity (or what? 24 bits?) you need to switch to BigInteger which can model "exact" integers of any size.


  Okay, they probably cap out at a very, very large number...much larger than doubles, but will likely last past the life of your PC.


This issue is so critical to the correctness of the solution that I'll leave it to stand on its own and leave any other review issues for others.