Crates.io | bc |
lib.rs | bc |
version | 0.1.15 |
source | src |
created_at | 2018-11-30 15:41:23.799053 |
updated_at | 2024-05-01 13:33:28.884646 |
description | Use `bc` in the Rust Programming Language. |
homepage | https://magiclen.org/bc |
repository | https://github.com/magiclen/bc |
max_upload_size | |
id | 99390 |
size | 8,426 |
Use bc
in the Rust Programming Language.
let result = bc::bc!("2 + 6");
assert_eq!("8", result.unwrap());
let result = bc::bc!("2.5 + 6");
assert_eq!("8.5", result.unwrap());
let result = bc::bc_timeout!("99^99");
assert_eq!("369729637649726772657187905628805440595668764281741102430259972423552570455277523421410650010128232727940978889548326540119429996769494359451621570193644014418071060667659301384999779999159200499899", result.unwrap());
let result = bc::bc_timeout!(20, "99^99");
assert_eq!("369729637649726772657187905628805440595668764281741102430259972423552570455277523421410650010128232727940978889548326540119429996769494359451621570193644014418071060667659301384999779999159200499899", result.unwrap());