diff --git a/packages/utils/src/f1-field.ts b/packages/utils/src/f1-field.ts index b102b01d8..bf62c0d02 100644 --- a/packages/utils/src/f1-field.ts +++ b/packages/utils/src/f1-field.ts @@ -86,7 +86,7 @@ export default class F1Field { * @throws if 'a' is zero. */ inv(a: bigint): bigint { - if (a === 0n) { + if (a === this.zero) { throw new Error("Zero has no inverse") }