So I have to design this circuit that allows you to select an ADC's input range. After iterating through 4 topologies and twiddling some resistor values, I managed to get the 1 volt scale right, but instead of 5 volts full scale on the other setting, I got, you guessed it, 6.66.
Update: after one more hour of calculations, it finally works on 3 out of 4 settings. But when I apply a 1V input, I get, you guessed it, 666mV instead of 2.5V output.
Update: no problem, I've since mathematically proven that none of my topologies would have worked, and found one that kind of did.