summaryrefslogtreecommitdiff
path: root/factors/totative.go
AgeCommit message (Collapse)Author
2023-09-05Remove totative ratio from factors APIAdrien Hopkins
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.
2023-09-04Add totative digit count to non-compact outputAdrien Hopkins
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.
2023-08-25Make totative ratio exactAdrien Hopkins
(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)
2023-08-21Add totative ratio and factor score to programAdrien Hopkins