| 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!
|
|
|
|
- TotativeDigits was defined incorrectly, previously counted totatives
from 0 to r-1, now counts digits from 1 to r. This ensures that
len(TotativeDigits(r)) = Totient(r).
|
|
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.
|
|
This value can easily be calculated as φ(r)/r. There is no need to have
this now that I have a function φ(r) (renamed to its mathematical name,
Totient).
I removed totative ratio instead of totient because, while it is more
important, totient is an integer while totative ratio is a float. This
means that the totative ratio can be calculated exactly from the
totient, but not the other way round.
|
|
This is done for a few reasons:
- Allow the user to easily determine the exact value of the totative
ratio
- This information is important when the digit map isn't accessible (for
radices >36)
- More consistency with factors
I don't show the exact values of totatives like I do with factors
because they're far more common - the superior highly composite (i.e.
one of the numbers with the highest factor count) number 720720 has
240 factors and 138240 totatives, for example.
|
|
(or, as exact as possible within a float64 - I only do one float
division, and everything else is a uint, so I think this means I will
get the closest available float64 value every time)
|
|
|