| Age | Commit message (Collapse) | Author |
|
|
|
This is the safest thing to do to ensure my software is free while
avoiding legal trouble ... hopefully, I'm not a lawyer!
|
|
-d shows only the digit map and nothing else, so if the digit map cannot
be shown (e.g. radices above 36 without -f), it makes sense to forbid
this rather than print an empty string.
|
|
Two related changes:
- Improve code readability of argument parsing
- Add extra error cases for arguments (elaborate on some errors, like
the case of parsing the radix)
|
|
|
|
This is intended to allow users to easily view the digit maps of many
different radices at once by running the program multiple times.
|
|
Instead of just saying how many totative digits there are, the new -t
flag allows the user to determine the specific digits. All totatives
will end in one of these digits, and all primes are either factors or
totatives. This feature is not useful in comparing radices, only
learning one you have already chosen.
Because there can be so many totatives (p - 1 of them for primes!), this
is not displayed by default. The digit map (without -f) gives this
information, and beyond its range every number will have more than 8
totatives, so do not use this flag if you only want the count.
|
|
factors.Type now supports all numbers; I have used lookup arrays instead
of determining whether a number is SAN or not. There are only 117
elements to store, and this makes the algorithm Θ(1), so it's an
improvement.
Also, I have changed the size of some integer values to correspond to
this change - they now indicate the size of numbers they can accept.
The only outputs that are hidden for large radices are:
- The digit map, which goes up to 36 because I don't have any more
digits beyond that point
- The multiplication table complexity, which is estimated above 2^16
(for performance), and can optionally be extended to 2^32 (above this,
the output could overflow a uint64).
|
|
These radices are large enough that:
- there is no reason to use them as actual radices
- calculating them takes a lot of time!
Therefore, the exact MTC and radix type shouldn't be calculated by
default. If you want to take the time, you still can with -l. I am
keeping the original 2^32 limit even with -l, because the problem with
that is not performance, it is that the resulting MTC could overflow a
uint64 (also the CAN list only goes up to this range).
|
|
Full digit maps will show every digit from 0 to 35, regardless of the
radix. This allows you to see extra fractions for small radices and to
get a digit map for radices above 36.
This isn't enabled by default because the extra "digits" added for small
radices aren't actually digits - so it may be unintuitive. There are
also some situations where only a radix's actual digits matter, such as
multiplication tables.
|
|
|
|
|
|
|