by yequalsx · 11y ago · 0 comments
In addition to getting it right did you use an exhaustive set of tests?
That said, I did make sure to test all the edge cases I could think of. I was actually going to guess (n^1, n^2, n^3) at first, until it failed for (1, 1, 1).
10 "yes" tests, 6 "no" tests.
Likely, it doesn't accept complex numbers (or vectors or matrices) as input as part of the (implicit) spec: in common parlance, "number" tends to mean real number.