If you're really interested in prime numbers you can't even be thinking double or any sort of floating point, anyway. Because a prime number is only one away from a non-prime, and rounded to x decimal places, the two are going to be the same. Floating point is not suited to this sort of numerical work... (that's also why moduli make no sense in floating world).
Lots of ways to get a remainder from a big number division spring to mind.
If speed is of the essence for you, you might find it handy to do something like shift the number by which you wish to divide leftwards until it is more than half the size of the number you are dividing, and then subtract it.
Now you have a (much) smaller number to divide. Go back to the original divider and start shifting again. When you find that the number you are trying to divide is actually smaller than the divider, then it is the remainder.
This method avoids any division at all. Since it relies only on shifting, it will scale up for any size of number provided you keep carrying bits along.
But I am not a mathematician or numerical person, so I'm sure the writers of big number packages have got more efficient ways than this.