| 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).
|
|
When using really large numbers, factors.Score could overflow, which
would cause an incorrect result. Using arbitrary-precision arithmetic
fixes this. I only do so above 2^28, since below then factor sums are
guaranteed to not overflow, and normal arithmetic is faster.
|
|
|
|
Panics are not the best way of handling errors in Go. I've replaced
panics with default values whenever a sensible one exists.
Factors(0) does not have a sensible default value (as every number is a
factor of zero), so it still panics.
|
|
|
|
|