( Jump to the original submission)
Closing as fixed as requested by Oliver Heimlich.

I have merged your changeset. This bug may be closed.

Now I have pushed a patch to my repository.
https://sourceforge.net/u/urathai/octave/ci/52d6a2565ed24bfe3e00d9ca65a98bd6cd0c5d73/

The I will fix that tomorrow!

After consulting various sources, I agree that the factorial function (ℕ⊆ℝ⟶ℝ) is continuous. In IEEE Std 17882015 there are no further restrictions on the function's properties. So, the result should be “com” and not “dac”.
Strictly speaking, the current result isn't wrong, it's only suboptimal.
Do you want to patch the function, the documentation and its test cases?

In the documentation it says that for scalar it should be equivalent to 1*2*3*..*N. For them to be equivalent it should give the decoration "com".
You rarely discuss continuity on discrete sets, mainly because it is not very interesting. However, topologically, all functions from discrete sets (with the discrete topology) are continuous.
I saw that the standard did not include the factorial function. But it would be great if you could find some clarification there.

The correct result depends on whether you consider the factorial function to be continuous. I am not 100% sure whether continuity allows to have isolated points in the domain. Long time I had no analysis lessons...
In either case, _dac is wrong ;) it should be either _def or _com depending on the answer to above question.
I will check later whether there is a some clarification in IEEE Std 17882015 regarding the definition of continuity of real functions.
Oliver

The factorial function at best gives the decoration "dac", a comment in the code says that this is because it is not continuous.
First of all, if we say that the factorial is not continuous it should at best have the decoration "def". The difference between "com" and "dac" is that "dac" can be unbounded, this is clearly not the problem for the factorial in general.
Secondly I would argue that the factorial is in fact continuous. The requirements for "dac" is from the documentation
x is a nonempty subset of Dom(f); and the restriction of f to x is continuous
Since the domain of the factorial is exactly the natural numbers it is continuous (the natural numbers have the discrete topology so every function is continuous). So the decoration should be "com" in general.

(Note: upload size limit is set to 16384 kB, after insertion of the required
escape characters.)
Attach Files:
Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.
Only project members can vote.