Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/magiclen/bc
Use `bc` in the Rust Programming Language.
https://github.com/magiclen/bc
bc rust
Last synced: 28 days ago
JSON representation
Use `bc` in the Rust Programming Language.
- Host: GitHub
- URL: https://github.com/magiclen/bc
- Owner: magiclen
- License: mit
- Created: 2018-11-30T15:38:10.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-01T13:33:23.000Z (8 months ago)
- Last Synced: 2024-05-03T04:47:46.824Z (8 months ago)
- Topics: bc, rust
- Language: Rust
- Homepage:
- Size: 26.4 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bc (An arbitrary precision calculator language)
====================[![CI](https://github.com/magiclen/bc/actions/workflows/ci.yml/badge.svg)](https://github.com/magiclen/bc/actions/workflows/ci.yml)
Use `bc` in the Rust Programming Language.
## Examples
```rust
let result = bc::bc!("2 + 6");assert_eq!("8", result.unwrap());
``````rust
let result = bc::bc!("2.5 + 6");assert_eq!("8.5", result.unwrap());
``````rust
let result = bc::bc_timeout!("99^99");assert_eq!("369729637649726772657187905628805440595668764281741102430259972423552570455277523421410650010128232727940978889548326540119429996769494359451621570193644014418071060667659301384999779999159200499899", result.unwrap());
``````rust
let result = bc::bc_timeout!(20, "99^99");assert_eq!("369729637649726772657187905628805440595668764281741102430259972423552570455277523421410650010128232727940978889548326540119429996769494359451621570193644014418071060667659301384999779999159200499899", result.unwrap());
```## Crates.io
https://crates.io/crates/bc
## Documentation
https://docs.rs/bc
## License
[MIT](LICENSE)