I\'ve come across this code, which incidentally my profiler reports as a bottleneck:
#include unsigned long a, b; // Calculate values for a and
I think when c=a-b is negative, if c is unsigned number, c is not the accurate answer. Using abs to guarantee c is a positive number.