[−][src]Module fraction::prelude
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:
GenericFractionfor fractionsGenericDecimalfor decimalsDynaIntfor dynamically allocated integers
Type Definitions
| BigDecimal |
Heap allocated |
| BigFraction |
Fraction consisting from two |
| Decimal |
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). |
| DynaDecimal |
Dynamically growing decimal |
| DynaFraction |
Fraction using T as the base type for numerator and denominator |
| Fraction |
Fraction consisting from two |