[rust-dev] Integer overflow, round -2147483648

Igor Bukanov igor at mir2.org
Thu Jun 19 22:04:38 PDT 2014

On 19 June 2014 21:03, Daniel Micay <danielmicay at gmail.com> wrote:
> I don't think we should have a big unsigned integer. It's not something
> I've seen other big integer libraries do.

I once spent some time figuring out a bug in a crypto library. It was
caused by writing in a corner case b - a, not a - b. unsigned BigNum
library that faults on a - b when a < b would have trivially caught
that. In addition unsigned BigNum could be more efficient (important
for crypto) as extra sign checks that signed BigNum often use may bear
non-trivial cost.

More information about the Rust-dev mailing list