diff options
| author | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-10-09 15:18:40 -0500 |
|---|---|---|
| committer | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-10-09 15:18:40 -0500 |
| commit | dbd02c8437ae634f4ece3c2979afeb19a3979f61 (patch) | |
| tree | 1217356bddc2717cfa320bc3137ca0e63868050a /factors/totative.go | |
| parent | eeff1f3c61fad805bb5ce0170e98378c3b706c18 (diff) | |
Add tests for properties of many outputs
- Test that every number returned by factors.Factors is actually a
factor of its argument.
- Test that every number returned by factors.TotativeDigits is actually
a totative of its argument, and that len(factors.TotativeDigits(r)) ==
factors.Totient(r).
- Test the properties of factors.Split (regular * totative == digit,
totative is a totative of radix).
Some of these tests don't test every number in the range, instead
picking randomly, which is done in order to avoid tests taking too long
to execute. Some testing is better than no testing!
Diffstat (limited to 'factors/totative.go')
0 files changed, 0 insertions, 0 deletions
