int divide(int a, int b) { if (b == 0) { throw const BarcodeException('Divide by zero'); } else if (a == 0) { return 0; } return aLogTbl[(logTbl[a] - logTbl[b]) % (size - 1)]; }