Tweak serialization to preserve full float precision in all possible cases.