int multiply(int a, int b) { if (a == 0 || b == 0) { return 0; } return _expTable[(_logTable[a] + _logTable[b]) % (_modulus - 1)]; }