Here is a small fragment of a Cplex log:
3186 2520 -666.6217 4096 956.6330 -667.2010 1313338 169.74%
Usually we expect the gap to decrease while the MIP solver is working its way. Here we see a different behavior. Because we go through zero the gap% is actually increasing here.
I believe the gap calculation used by Cplex is:
Obviously this is sensitive w.r.t. to the sign of BestInteger. Of course in practice we don’t see this behavior very often (in many models BestInteger and BestNode have the same sign).