This is a neat idea from Jose Blanes and Jose Carrasco at the University of Miguel Hernandez in Spain -- it uses a dual rail to rail opamp to divide the signal, and subtract -- much better than some of the precision diode rectifiers: