https://github.com/zanderlewis/yotta
Yotta is a pure no_std Rust arbitrary-precision integer library with 0 dependencies.
https://github.com/zanderlewis/yotta
arbitrary-precision bigint biginteger bignum bignumber bignums no-dependencies no-deps no-std rust
Last synced: 9 months ago
JSON representation
Yotta is a pure no_std Rust arbitrary-precision integer library with 0 dependencies.
- Host: GitHub
- URL: https://github.com/zanderlewis/yotta
- Owner: zanderlewis
- License: other
- Created: 2025-02-14T16:16:01.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-02-17T22:37:42.000Z (11 months ago)
- Last Synced: 2025-04-29T11:52:35.790Z (9 months ago)
- Topics: arbitrary-precision, bigint, biginteger, bignum, bignumber, bignums, no-dependencies, no-deps, no-std, rust
- Language: Rust
- Homepage: https://crates.io/crates/yotta
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Yotta
Yotta is a pure Rust arbitrary-precision arithmetic library. It is designed to be fast and easy to use. Yotta is still in development, so it is not recommended for production use.
Yotta is named after `Yottabyte`, the largest unit of digital information storage. This is because Yotta can handle numbers of any size.
## Features
- [x] Dynamic precision arithmetic
- [x] Traits for using operators
- [x] Floating point arithmetic
- [x] Easy to use
- [x] `no_std`
## Usage
First, add Yotta to your `Cargo.toml`:
```bash
cargo add yotta
```
Then, you can use Yotta in your project:
```rust
use yotta::Yotta;
fn main() {
let num1 = Yotta::new("123", 32);
let num2 = Yotta::new("456", 32);
let sum = num1.clone() + num2.clone();
let diff = num2.clone() - num1.clone();
assert_eq!(sum, Yotta::new("579", 32));
assert_eq!(diff, Yotta::new("333", 32));
}
```
## License
Yotta is licensed under the [Protected Work License (PWL) v1.0](LICENSE.md). This license is designed to protect open source software from being paywalled without restricting commercial use. It also implements the MIT License.