A high power-factor buck-boost converter having a rectified low-frequency AC line voltage input and a DC output comprising: a magnetic element ; a controlled switch having a gate terminal and a drain terminal that is coupled to the magnetic element ; a rectifier diode coupled to the magnetic element ; an output smoothing capacitor coupled to the rectifier diode ; and a control circuit having an output coupled to the gate terminal of the controlled switch for repeatedly turning the controlled switch off for a first time duration and on for a second time duration; wherein the second time duration is determined as a function of the first time duration immediately preceding the second time duration, characterized in that the high power-factor buck-boost converter further comprises an analog differential integrator configured to receive as inputs an output voltage from the output smoothing capacitor and a reference voltage, and output a difference voltage that is equal to the difference between the output voltage and the reference voltage; wherein the analog differential integrator is configured to generate a control voltage that is a time integral of the difference voltage; and wherein the control circuit comprises: a flip-flop circuit configured to turn the controlled switch on and off repeatedly at a high frequency rate; a controlled ramp generator configured to generate a linear voltage ramp having a slew rate that is proportional to the control voltage; a fixed ramp generator configured to generate a quadratic voltage ramp having a slew rate that is proportional to a time duration of an active state of an output of the flip-flop circuit; and a comparator circuit configured to compare the linear voltage ramp and the quadratic voltage ramp. a magnetic element ; a controlled switch having a gate terminal and a drain terminal that is coupled to the magnetic element ; a rectifier diode coupled to the magnetic element ; an output smoothing capacitor coupled to the rectifier diode ; and a control circuit having an output coupled to the gate terminal of the controlled switch for repeatedly turning the controlled switch off for a first time duration and on for a second time duration; wherein the second time duration is determined as a function of the first time duration immediately preceding the second time duration, the high power-factor buck-boost converter further comprises an analog differential integrator configured to receive as inputs an output voltage from the output smoothing capacitor and a reference voltage, and output a difference voltage that is equal to the difference between the output voltage and the reference voltage; wherein the analog differential integrator is configured to generate a control voltage that is a time integral of the difference voltage; and wherein the control circuit comprises: a flip-flop circuit configured to turn the controlled switch on and off repeatedly at a high frequency rate; a controlled ramp generator configured to generate a linear voltage ramp having a slew rate that is proportional to the control voltage; a fixed ramp generator configured to generate a quadratic voltage ramp having a slew rate that is proportional to a time duration of an active state of an output of the flip-flop circuit; and a comparator circuit configured to compare the linear voltage ramp and the quadratic voltage ramp. a flip-flop circuit configured to turn the controlled switch on and off repeatedly at a high frequency rate; a controlled ramp generator configured to generate a linear voltage ramp having a slew rate that is proportional to the control voltage; a fixed ramp generator configured to generate a quadratic voltage ramp having a slew rate that is proportional to a time duration of an active state of an output of the flip-flop circuit; and a comparator circuit configured to compare the linear voltage ramp and the quadratic voltage ramp. <EOS>