Use a safe conversion when decoding floats