I tried a circuit to convert sinewave (let say 50hz) to rectangular pulse signal using non inverting comparator with upper threshold and lower threshold symmetric around 0V. So i calculated the resistor values assuming comparator as ideal . But when i tried simulation with the real comparator, i got around 20mV difference between upper threshold and lower threshold( upper threshold as 950mV and Lower threshold as -970mV , ideal values are +/-960mV). So i would like to know causes for this error.Please let me know if you have any solution to reduce the error.