Arbitrary-size, safe natural number ≥ 0. See also Natural.Morph
Positive natural number, can be arbitrarily large
Convert from a natural number of type N
Convert to a natural number of type N
Keep in mind that this can overflow
since N is fixed in bit size just like Int while Natural is not.
The type is rarely useful in its current state, as the only thing you can do is convert from and to other types.
This is enough for my use-cases but feel free to PR or open an issue if you'd like to see support for arbitrary-precision arithmetic like addition, multiplication, ...
Whole number (integer) ≥ 0 of arbitrary precision. Either 0 directly or a positive number represented by the bit
Ifollowed by someBitsWhy does the type look like this?
If you need a natural number representation with a specific number of bits, you can try
For larger numbers, where you want to allow numbers of arbitrary precision, only our version can enforce that
==always gives the correct answer, since theArraySizedcould be constructed with leadingOs!