diff --git a/src/abstract/modular.ts b/src/abstract/modular.ts index 84ab0fb..58825e8 100644 --- a/src/abstract/modular.ts +++ b/src/abstract/modular.ts @@ -280,6 +280,7 @@ export function FpPow(f: IField, num: T, power: bigint): T { return p; } +// 0 is non-invertible: non-batched version will throw on 0 export function FpInvertBatch(f: IField, nums: T[]): T[] { const tmp = new Array(nums.length); // Walk from first to last, multiply them by each other MOD p