Module fraction::prelude

source ·
Expand description

Predefines some types for the most common use cases

You should consider this module as a list of shortcuts, and not as the list of only available types. The actual workhorses are a part of the Public API and you are encouraged to use them straightforwardly whenever you may feel necessary.

Long story short, you may compose your own types with these:

Re-exports

pub use super::dynaint::DynaInt;

Structs

A big signed integer type.
A big unsigned integer type.
Decimal type implementation

Enums

Generic implementation of the fraction type

Type Definitions

Heap allocated BigUint for numerics and usize for precision
Fraction consisting from two BigUint numbers
Basic Decimal based on 2 u64 numbers and one u8 for precision. Able to keep up to 19 digits in the number (including both sides across the floating point).
Stack allocated, but dynamically growing into heap if necessary
Stack allocated, but dynamically growing into heap if necessary
Fraction consisting from two u64 numbers