I have one input, which will swing from -5V to +5V, and an inverting op amp, so there will always be one positive voltage output. The inverting amplifier have a gain of 1. So if the input is +2V, the inverting op amp will be -2V, and vice versa.

I want to compare the two values using an op amp and therefore only get the positive output, but I am not sure how to design the diagram.

Your help is appreciated