View Single Post
Old 2019-08-09, 14:21   #2
lavalamp's Avatar
Oct 2007
Manchester, UK

2×5×137 Posts

For the specific case of 1523213.17, you could compute mod 152321317 instead, then once you have that value use it to compute your final float mod.

In general, I suppose it depends on how many decimal digits you have and how much precision you need, but multiplying your modulo by 10^n should work decently well for many inputs.
lavalamp is offline   Reply With Quote