Skip to main content

Crate mpdec

Crate mpdec 

Source
Expand description

§mpdec

High-precision decimal arithmetic.

§Example

use mpdec::Decimal;
use std::str::FromStr;

fn main() {
    let a = Decimal::from_str("1.2345").unwrap();
    let b = Decimal::from_str("2.0000").unwrap();
    let c = a * b;
    println!("Result: {}", c); // Result: 2.4690
}

Re-exports§

pub use mpdec_sys;

Modules§

context
error

Structs§

Decimal