摘要:
/** * 计算a**b(mod c) * @param {bigInt} a 底数 * @param {bigInt} b 指数 * @param {bigInt} c 模 * @returns {binInt}结果 */ function fastPowerMod(a, b, c){ let r 阅读全文
摘要:
/** * 判断两个大整数是否互质 * @param {binInt} a 第一个整数 * @param {bigInt} b 第二个整数 * @returns {false} 最大公约数是否为1 */ function isCoprime(a, b){ let x = a let y = b le 阅读全文
摘要:
/** * 计算a**b(mod c) * @param {bigInt} a 底数 * @param {bigInt} b 指数 * @param {bigInt} c 模 * @returns {binInt}结果 */ function fastPowerMod(a, b, c){ let r 阅读全文