3 ms·
Yes, but again, if you care about accuracy, it's not as easy as "time = fmod(time, 1e6)" or something: take look at any "accurately rounding" implementation of
by Joker_vD 4y ago
Yes, but again, if you care about accuracy, it's not as easy as "time = fmod(time, 1e6)" or something: take look at any "accurately rounding" implementation of sin(x) (e.g. in gcc) to see weird floating-math tricks used in the range reduction.
Also, it is not always about time, sometimes it is about position in space! Generating an (almost) infinite world is usually done in the "animation" style (using a noise generator or some such) and with rounding/overflow errors you get e.g. Minecraft's so called "Far Lands" [0] — game physics used to break there as well.
[0] https://minecraft.fandom.com/wiki/Far_Lands https://minecraft.fandom.com/wiki/Far_Lands