diff options
| author | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-08-30 13:53:53 -0500 |
|---|---|---|
| committer | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-08-30 14:05:09 -0500 |
| commit | 778220b2e3ce662e733727fb9a560fcfe85c19eb (patch) | |
| tree | 38d18d3db70943b42a62f1f786777022e954bd87 /factors/type.go | |
| parent | b9164fb5b41136a63391f5675a848ec4a7711cb6 (diff) | |
Add digit map calculation
This is not in the output yet, but it will be soon - printing it is
another task since I want colours in my output.
Diffstat (limited to 'factors/type.go')
| -rw-r--r-- | factors/type.go | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/factors/type.go b/factors/type.go index e587ebb..39aab9b 100644 --- a/factors/type.go +++ b/factors/type.go @@ -52,7 +52,7 @@ func Type(n uint32) NumberType { func isSAN(n uint32) bool { if n <= 2 { return true - } else if n % 4 != 0 && n % 6 != 0 { + } else if n%4 != 0 && n%6 != 0 { return false } @@ -77,7 +77,7 @@ func isSAN(n uint32) bool { func exponentsOrdered(n uint32) bool { if n <= 2 { return true - } else if n % 4 != 0 && n % 6 != 0 { + } else if n%4 != 0 && n%6 != 0 { return false } @@ -102,7 +102,7 @@ func exponentsOrdered(n uint32) bool { func practical(n uint32) bool { if n <= 2 { return true - } else if n % 4 != 0 && n % 6 != 0 { + } else if n%4 != 0 && n%6 != 0 { return false } @@ -126,11 +126,3 @@ func practical(n uint32) bool { return true } - -func uintpow(a, b uint) uint { - result := uint(1) - for i := uint(0); i < b; i++ { - result *= a - } - return result -} |
