This question already has an answer here:
- Why do you need float/double? 12 answers
I understand why floats served a purpose in the past. And I think I can see why they're useful in some simulation examples today. But I think those example are more exceptional than common. So I don't understand why floats are more prevalent in simple simulations rather than very high precision integers.
A classic argument is that floats provide a greater range, but high precision integers can meet this challenge now. For example: with modern 64-bit processors, we can do fast integer calculations up to 2^64. The solar system is a little less than 10 billion km in width. 10 billion km divided by 2^64 is about 5 microns. Isn't being able to represent position within the solar system to the precision of half a human hair enough?
On the flip-side, rounding errors from floating calculations can present problems. You need to consider the scale of the calculations to make certain that you're not inadvertently introducing error to your simulation.
So why do personal computers even need FPUs anymore? Why not just leave floats to the supercomputers?