You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[...]/scratch.nim(7) scratch
[...].nimble/pkgs/bigints-0.4.3/bigints.nim(484) *
[...].nimble/pkgs/bigints-0.4.3/bigints.nim(394) multiplication
[...].choosenim/toolchains/nim-#devel/lib/system/fatal.nim(39) sysFatal
Error: unhandled exception: index out of bounds, the container is empty [IndexError]
This is because a.limbs is @[]. Would it be possible for an uninitialized BigInt to default to limbs = @[0], to be consistent with nim integers? Otherwise, maybe there could be a flag initialized that is checked before trying to operate on a BigInt, so we get slightly more readable errors. I'm not super proud about it, but tbh this took me a while to debug. To be fair, my actual code was slightly more complex and resulted in a zero BigInt not being initialized in a corner case.
The text was updated successfully, but these errors were encountered:
Consider the following:
This results in the following stack trace:
This is because
a.limbs
is@[]
. Would it be possible for an uninitializedBigInt
to default tolimbs = @[0]
, to be consistent with nim integers? Otherwise, maybe there could be a flaginitialized
that is checked before trying to operate on aBigInt
, so we get slightly more readable errors. I'm not super proud about it, but tbh this took me a while to debug. To be fair, my actual code was slightly more complex and resulted in a zero BigInt not being initialized in a corner case.The text was updated successfully, but these errors were encountered: