summaryrefslogtreecommitdiff
path: root/factors/mtc.go
AgeCommit message (Collapse)Author
2023-11-12Add per-file copyright notices & contact infoAdrien Hopkins
This is the safest thing to do to ensure my software is free while avoiding legal trouble ... hopefully, I'm not a lawyer!
2023-10-09factors: Give all exported members proper godocAdrien Hopkins
2023-09-07Calculate type of all radices without -lAdrien Hopkins
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).
2023-08-30Add digit map calculationAdrien Hopkins
This is not in the output yet, but it will be soon - printing it is another task since I want colours in my output.
2023-08-25Limit MTC calculation to < 2^32Adrien Hopkins
This ensures the output can fit into a uint64. Also, calculating it at this stage is slow, and not calculating it can make the program nearly instant even for very large numbers!
2023-08-21Add MTC to outputAdrien Hopkins
(MTC = Multiplication Table Complexity)