#bc #timeout #math #parse #equation

bc

Use bc in the Rust Programming Language

1 unstable release

0.1.0 Nov 30, 2018

#57 in #parse

Download history 6/week @ 2018-11-30 7/week @ 2018-12-07 2/week @ 2018-12-14 2/week @ 2018-12-21 2/week @ 2018-12-28 2/week @ 2019-01-04 2/week @ 2019-01-11 5/week @ 2019-01-18 1/week @ 2019-01-25 4/week @ 2019-02-01 1/week @ 2019-02-08

2 downloads per month

MIT license

7KB
88 lines

bc (An arbitrary precision calculator language)

Build Status

Use bc in the Rust Programming Language.

Examples

#[macro_use] extern crate bc;

let result = bc!("2 + 6");

assert_eq!("8", result.unwrap());
#[macro_use] extern crate bc;

let result = bc!("2.5 + 6");

assert_eq!("8.5", result.unwrap());
#[macro_use] extern crate bc;

let result = bc_timeout!("99^99");

assert_eq!("369729637649726772657187905628805440595668764281741102430259972423552570455277523421410650010128232727940978889548326540119429996769494359451621570193644014418071060667659301384999779999159200499899", result.unwrap());
#[macro_use] extern crate bc;

let result = bc_timeout!(20, "99^99");

assert_eq!("369729637649726772657187905628805440595668764281741102430259972423552570455277523421410650010128232727940978889548326540119429996769494359451621570193644014418071060667659301384999779999159200499899", result.unwrap());

Crates.io

https://crates.io/crates/bc

Documentation

https://docs.rs/bc

License

MIT

Dependencies

~142KB