text: assertThrows(function() { BigInteger('-1').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-10').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-10').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-10').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-10').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-10').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-10').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-10').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-10').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-10').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-10').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-10').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-100').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-100').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-100').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-100').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-100').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-100').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-100').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-100').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-100').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-100').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-100').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1000').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1000').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1000').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1000').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1000').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1000').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1000').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1000').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1000').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1000').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-1000').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-11').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-11').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-11').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-11').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-11').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-11').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-11').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-11').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-11').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-11').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-11').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-123').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-123').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-123').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-123').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-123').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-123').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-123').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-123').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-123').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-123').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-123').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-2').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-2').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-2').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-2').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-2').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-2').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-2').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-2').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-2').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-2').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-2').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3210').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3210').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3210').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3210').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3210').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3210').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3210').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3210').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3210').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3210').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-3210').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9876543210').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9876543210').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9876543210').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9876543210').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9876543210').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9876543210').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9876543210').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9876543210').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9876543210').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9876543210').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-9876543210').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-99').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-99').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-99').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-99').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-99').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-99').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-99').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-99').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-99').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-99').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('-99').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('0').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('0').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('0').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('0').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('0').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('0').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('0').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('0').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('0').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('0').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('0').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('10').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('10').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('10').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('10').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('10').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('10').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('10').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('10').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('10').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('10').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('10').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('100').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('100').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('100').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('100').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('100').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('100').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('100').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('100').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('100').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('100').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('100').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1000').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1000').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1000').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1000').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1000').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1000').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1000').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1000').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1000').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1000').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('1000').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('11').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('11').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('11').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('11').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('11').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('11').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('11').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('11').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('11').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('11').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('11').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('123').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('123').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('123').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('123').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('123').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('123').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('123').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('123').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('123').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('123').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('123').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('2').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('2').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('2').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('2').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('2').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('2').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('2').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('2').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('2').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('2').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('2').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('3').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('3').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('3').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('3').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('3').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('3').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('3').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('3').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('3').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('3').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('3').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9876543210').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9876543210').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9876543210').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9876543210').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9876543210').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9876543210').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9876543210').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9876543210').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9876543210').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9876543210').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('9876543210').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('99').modPow(BigInteger('1'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('99').modPow(BigInteger('10'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('99').modPow(BigInteger('100'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('99').modPow(BigInteger('1000'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('99').modPow(BigInteger('11'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('99').modPow(BigInteger('123'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('99').modPow(BigInteger('2'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('99').modPow(BigInteger('3'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('99').modPow(BigInteger('9'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('99').modPow(BigInteger('9876543210'), BigInteger('0')); }, /divide by zero/i);
  assertThrows(function() { BigInteger('99').modPow(BigInteger('99'), BigInteger('0')); }, /divide by zero/i);
  