This is the difference between types and tags (sometimes they're conflated).
This code is buggy because they are using floats internally. A 32bit float can not represent the exact measurements specified.
This is a perfect example of why just statically type checking your code does not make it correct.
I love that you get all of this safety with zero runtime cost.