Effortlessly operate on numbers like 2e19 or 2*10^4 and more with this Rust implementation of standard form. Simplify, convert, and manipulate large numerical expressions with ease.
StandardForm
struct.num_traits
crate as well.Add this library to your Cargo.toml
:
toml
[dependencies]
standardform = "0.1.1" # Version
To enable intergation it with num_traits
, enable num
feature:
toml
[dependencies]
standardform = { version = "0.1.1" , features = ["num"] }
Then
```rust use standardform::StandardForm;
fn main() { // Create a new StandardForm instance let number = StandardForm::new(2.0, 19);
// Perform arithmetic operations
let result = number * StandardForm::new(1.5, -3);
// Compare numbers
if result > StandardForm::new(1.0, 10) {
println!("Result is greater than 1*10^108.");
}
} ```
Please note that the examples provided here are simplified and serve as a starting point. For comprehensive documentation of the crate, please visit the crate documentation for a better understanding of the crate's functionalities and APIs.
Contributions are welcome! If you find a bug or have an enhancement in mind, feel free to open an issue or submit a pull request.