Comparison in toBase
dfstio opened this issue · comments
DFST commented
Should the line in toBase() be
for (let power = base; power <= x; power **= 2n) {
instead of
for (let power = base; power < x; power **= 2n) {
to properly handle the case when x is equal to base?
https://github.com/o1-labs/o1js-bindings/blob/main/crypto/bigint-helpers.ts#L191
Gregor Mitscha-Baude commented
yes!!