dfkzr

Crates.iodfkzr
lib.rsdfkzr
version0.1.0
sourcesrc
created_at2023-06-13 12:25:38.933481
updated_at2023-06-13 12:25:38.933481
descriptionDezimalfestkommazahlrechnung - decimal fixed point arithmetic with up to 19 digits
homepage
repository
max_upload_size
id888967
size171,458
Lukas Himbert (hwjsnc)

documentation

README

Dezimalfestkommazahlrechnung

Features

  • Basic unsigned fixed-point arithmetic
  • Wrapper types implementing arithmetic traits for convenience, see [UDf64Checked] and [UDf64Saturating]
  • up to 19 effective decimal digits (integer part and fractional combined)
  • #![no_std] compatible, no runtime dependencies except core (except for some tests)
  • No heap allocations
  • Written in straightforward safe Rust, accompanied by an extensive automated test suite
  • Display

Planned features:

  • signed type
  • TryFrom<&str>, FromStr
  • narrowing/widening casts

Possible future features:

  • approximations for:
    • square root, higher order roots
    • exp, log
    • trig functions
  • conversion to/from float
  • NonZero variants
  • u32-based variants
  • localized Display/parse

Non- and anti-goals:

  • Choosing precision/width at runtime
  • Unchecked/wrapping or panicking API (just use .unwrap())
  • Performance: All basic operations are implemented with a handful of operations on u64 or u128 (and overflow checks), so performance should be decent. I don't care enough to make benchmarks though.
Commit count: 0

cargo fmt