mrvn wrote:Also there is a standard for floating point numbers that dictate strict rounding rules and allow you to convert to decimal and back without any loss of precision. You just have to do it right and not simply cut of floats after 5 digits.
Is there? I don't know if factorio really uses bare C++ floating point types (and kinda doubt it), but either way, I'm sure it's easy to come close, but hard to truly nail this. And presumably, factorio needs (or at least wants) to really nail this, to avoid desyncs.
Cross-platform architecture-variant-independent round-trippable floating-point pretty-printing is hard AF to implement perfectly. Not saying it's an insurmountable problem, just wonder if maybe you're not quite aware of what a profound clusterfuck floats are in x86. I could easily see it taking a competent-man-month, or something in that ballpark (0.999999999999999999999999999999997 x 10⁰ competent-man-months?
), and a non-negligible hardware budget, to nail down 100% perfectly.
That stated, some liberally-licensed prior art surely exists, somewhere, from which the really tricky bits could be stolen.