Skip to content

attempt to add with overflow happened in a % b #36

@mohanson

Description

@mohanson

New bugs happened.

use numext_fixed_uint::U4096;

fn main() {
    let a = U4096::from_dec_str("77207453359070457604620928442586248569527320043595348948921733518358535471105").unwrap();
    let b = U4096::from_dec_str("115792089237316195423570985008687907853269984665640564039457584007913129639936").unwrap();

    let r1 = &a * &a;
    println!("{}", r1);

    let r2 = r1 % b;
    println!("{}", r2);
}
thread 'test_state_work' panicked at 'attempt to add with overflow'

Originally posted by @mohanson in #35 (comment)

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions