In the figure we show how to improve the performance of an operational amplifier with gain 100 using a comparator of the four of an LM139. The gain is given by R2, which can be changed. The output transistor supports an equivalent. The circuit is from National Semiconductor's Linear Applications Handbook.