OffsetNum
objects can now be built fromRange
objects in addition toRangeInclusive
objects.- Cleaned up documentation comments on
WrapCountNum
,WrapCountNumC
,OffsetNum
, andOffsetNumC
.
- No changes in functionality..
- Updated documentation in
lib.rs
with regard toOffsetNum
andOffsetNumC
. - Added some more keywords.
- Fixes bug in subtraction for
OffsetNum
andOffsetNumC
.
- Fixes bug in equality comparison for
OffsetNum
andOffsetNumC
.
- Added iterator support for
OffsetNum
andOffsetNumC
. - Removed dependency on
trait_set
crate. ModNumC
,WrapCountNumC
, andOffsetNumC
implementDefault
.
OffsetNum
andOffsetNumC
introduced.
WrapCountNum
andWrapCountNumC
now support.pow()
.
- Moved
extern crate alloc;
, inadvertently added at the top level, tomod tests
.
- Added
WrapCountNum
andWrapCountNumC
, variants ofModNum
/ModNumC
that track wraparounds.
- Updated
ModNumC
to support.pow()
,.inverse()
, and division. - Refactored as much implementation as possible into the
MNum
trait and some internal macros. - Changed from Unlicense to Apache 2.0/MIT dual license.
- Updated a doctest and edited some documentation.
- Upgraded
num
dependency to0.4
.
ModNum
andModNumC
now implement theHash
trait.
- Changed signature of the Chinese remainder solver to take ownership of the iterator upon which it operates.
ModNum
andModNumC
now implementPartialOrd
with reference to generic integers.
- Added the
replace()
method.
- Added the
with()
method. - Updated
SaturatingAdd
andSaturatingSub
documentation. - Tested and updated for Rust 2021 edition.
- Added some more documentation tests for
ModNumC
.
- Added
ModNumC
, which uses const generics to enable compile-time checking of compatible modulo. - Added
MNum
trait to allowModNumIterator
to work with bothModNum
andModNumC
. Note: To use the.a()
and.m()
methods, be sure to importMNum
(or justuse bare_metal_modulo::*;
)
- Learned that
num::Saturating
is deprecated. - Removed
num::Saturating
implementation. - Replaced by implementing
num::traits::SaturatingAdd
andnum::traits::SaturatingSub
instead.
- Implemented the
num::Saturating
trait.
- Added
ModNum
as a right-hand side option for arithmetic operators. - Implemented
Display
forModNum
objects.
- Added division and modular exponentiation with negative exponents.
- Added modular exponentiation and inverse.