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
$ cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running `target/debug/illformed-giraffe`
thread 'main' panicked at 'assertion failed: self.well_formed()', /home/d34d10cc/.cargo/registry/src/github.com-1ecc6299db9ec823/ramp-0.3.12/src/int.rs:314:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.
fn main() {
use std::iter;
let num: String = iter::repeat('0')
.take(64)
.collect();
let x = Int::from_str_radix(&num, 2).unwrap();
println!("{}", x);
}
Assertion fails because most significant Limb is zero. That happened because Int::from_str_radix doesn't consider leading zeros.
Cargo.toml:
Code:
Output:
Expected output:
The text was updated successfully, but these errors were encountered: