Commit Graph

2 Commits

Author SHA1 Message Date
948ac5f297 Adjusted the natrual definition to now handle sub.
This neded a subtraction that would work on natural numbers where
subtraction isn't closed. This will now handle it and filter to make
sure the answer is 1 or higher.
2026-02-26 13:14:21 -05:00
fbef05fcd1 [#2] Cleaned up the base traits.
I have switched to using the `core::` calling convention instead of using
the `std::` by means of `extern crate core as std`. This makes it so
that the library is easier to reason.

The `Number` trait has been broken up now into `Number` and `Natural`.
This was done to make it so that the pure mathematical types were
separate from the Rust implementation types.

I went and added better comments, including examples.

The macros were tightened up so that the implementations took up less
space.

The FromNumber and ToNumber stuff will need to be reimplemented yet.
Some of it seemed redundant with From and TryFrom traits now. It will be
something to come back to and implement at the end.
2026-02-12 19:21:53 -05:00