Use decimals types instead of float
We should use decimal types to avoid floating point madness.
The minimum internal unit for printed circuit board and footprint files is one nanometer so there is maximum resolution of six decimal places or 0.000001 mm. Any precision beyond six places will be truncated.
From: https://dev-docs.kicad.org/en/file-formats/sexpr-intro/index.html. There's a similar statement about the schematics but to 4 decimal places.