Added Konrad's modification of the hypermath midpoint function