[go: up one dir, main page]

Unexpected panic in checked_mul

Thank you for this powerful and useful library! I believe that checked_mul panics under some conditions, which I didn't think was supposed to happen.

When I run this program:

type MyFix = FixedI128; let x = Fix::from_str("-9.079999999999999999999").unwrap(); let result = x.checked_mul(x);

Expected: result is None

Actual: thread 'xxx' panicked at 'assertion failed: self >> 64 == 0', /Users/adam/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcore/macros/mod.rs:10:9

Edited by Adam Wolff