Crate fraction [] [src]

Fraction is a lossless float type implementation that can be used for matching, ordering and hashing.

The main goal of the project is to keep precision that floats cannot do.

Base arithmetic implemented upon the num crate (in particular its rational module).

The main object in the library is GenericFraction<T> where T: Integer.

However, there are two shortcuts for the two most common use cases:

Enums

GenericFraction

Generic implementation of the fraction type

Sign

Sign representation

Type Definitions

BigFraction

Fraction consisting from two BigUint numbers

Fraction

Fraction consisting from two u64 numbers