Closed scheinerman closed 2 years ago
Hey @scheinerman, if you want to make a PR to address this, I can happily review it since you are right, it should return 1 in both cases.
Hi @logankilpatrick , I am OK at coding by really don't understand at all how git works! But I suppose we just replace this
hyperfactorial(n::Integer) = prod(i->i^i, BigInt(2):n)
with this
hyperfactorial(n::Integer) = (n==0) ? BigInt(1) : prod(i->i^i, BigInt(1):n)
I know how to edit my own code, but not other people's!
The value of the hyperfactorial function for both 0 and of 1 is 1. Should be easy to add these as special cases.