Encode floats correctly.