encode floats directly