diff options
Diffstat (limited to 'radix_info.go')
| -rw-r--r-- | radix_info.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/radix_info.go b/radix_info.go index 8bdfa5b..f3aecce 100644 --- a/radix_info.go +++ b/radix_info.go @@ -22,6 +22,9 @@ func main() { fmt.Printf("Totative Ratio: %03.1f%%\n", factors.TotativeRatio(n)*100.0) fmt.Println("2345 Rank:", factors.BasicRank(n)) + if n < 1<<32 { + printTypeMessage(factors.Type(uint32(n))) + } fmt.Println("Multiplication Table Complexity:", factors.MTC(n)) fmt.Printf("Natural Logarithm: %.2f\n", math.Log(float64(n))) } else { @@ -34,3 +37,16 @@ func main() { fmt.Println("Please provide an argument (radix to study).") } } + +func printTypeMessage(t factors.NumberType) { + switch t { + case factors.ColossallyAbundant: + fmt.Println("This radix is colossally abundant!") + case factors.Superabundant: + fmt.Println("This radix is superabundant.") + case factors.OrderedExponent: + fmt.Println("This radix has ordered exponents.") + case factors.Practical: + fmt.Println("This radix is practical.") + } +} |
