Better loop arithmetic in divapprox_classical.