Bodigrim / arithmoi

Number theory: primes, arithmetic functions, modular computations, special sequences
http://hackage.haskell.org/package/arithmoi
MIT License
147 stars 40 forks source link

Add divisorCount as a synonym for tau #162

Closed erantapaa closed 5 years ago

erantapaa commented 5 years ago

Even though I use this library a lot I keep on forgetting to use the tau function to get the number of divisors of a number.

The index lists a host of functions related to the divisors a number, but it's not clear that it has a divisor count function. I suggest adding a function called divisorCount so that this capability may be easily discovered.

Bodigrim commented 5 years ago

Totally makes sense. Do you know how is this function named in other languages/libraries/platforms? Should it be divisorCount / countDivisors / numberOfDivisors / etc.?

Bodigrim commented 5 years ago

Done, thanks for suggestion.