Assuming that we can just ignore the y position then and without it, it should just bounce from side to side, negating the velocity might not be quite enough as it could still be out of range and be re-inverted next time.
If an assumed position was 799.9:
799.9 + (v * dt) = new position
if v = 1 and dt = 1:
799.9 + (1 * 1) = 799.9 + 1 = 800.9
If, then, on the next update, dt is lower...
for example, if dt is now 0.5:
800.9 >= 800 so v becomes inverted (v = -1)
then:
800.9 + (-1 * 0.5) = 800.9 + -0.5 = 800.9 - 0.5 = 800.4
As you can see, in the next update, it's still greater than or equal to 800 so the velocity would be inverted again and increase the position value.
The easy solution to this is to move it back into range when it goes out of range:
if (position.x > 800.f) position.x = 800.f;
Of course, the velocity still needs to be flipped as before but this movement stops it from being able to re-flip it.
Also, the same "clamp" would need to be applied to the lower limit.