Floating point accuracy

If you stuck with integers, you wouldn't have these problems and your code would run faster.

Need decimal places?
How do you do say fractions of a meter?

If you work in millimeters then you have meters to 3 places. Micrometers give you 6 places.
By choosing your units, you can work with integers right down to any scale.

You can print the decimal places where you want but code-internally you don't need them

Arduino allows 64-bit integers. That's 19 decimal places that never rounds off unless you choose to and runs faster than FP without an FPU.

You can get even more flexibility for small loss but I forget the name of that non-fixed-point scheme and would rather go with the simpler choose-your-units method.