Skip to content

Quotique/rdecimal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RDecimal

Naive implementation for decimal numbers in Rust.

Inspired by https://github.com/paupino/rust-decimal but suppots different mantissa type.

WIP

Usage

use rdecimal::{Decimal, D64, D128};

let dec = D64::new(10, -3); // 0.01

let f_str = D128::from_str("0.02").unwrap();

let f_num = D64::from(10); // 10.

Features:

  • arithmetics (+, -, *)
  • serde integration
  • postgres integration

TODO:

  • division
  • docs
  • diesel support

About

Implementation of generic decimal type

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages