The real problem is: You are sure there are the three cases n>0, n=0 and n<0, but people who are sure they are right are often wrong. And you would want to express that.
Swift has a switch statement where the compiler requires a guarantee that every case is handled. In your case, you write your three cases. The compiler checks that everything is covered. If not then you must add another case handling the missing values, or a “default” statement. If everything is covered, “default” is not allowed. If the compiler cannot check it, it’s not allowed.
So you would write down your three cases, and everything is clear. Two cases plus default means there might be cases that you missed. Three cases + default is not allowed.
(In another post: What if I change “n > 0” to “n > 1”? The compiler would figure out that not everything is covered and force you to fix it somehow. If you wrote two cases + default then the default would now unexpectedly include the “n = 1” case.
An easy fix in any language would be instead of a final else or else if have a statement “remaining n > 0” which implies an assert that everything is covered, with the compiler optimising things.