bugGNU Octave - Bugs: bug #51783, [octave forge] (interval)...


bug #51783: [octave forge] (interval) incorrect decoration for factorial

Submitted by:  Joel Dahne <urathai>
Submitted on:  Fri 18 Aug 2017 07:36:18 AM UTC  
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: otherOperating System: Any

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Sun 20 Aug 2017 05:54:50 PM UTC, comment #7:

Closing as fixed as requested by Oliver Heimlich.

Markus Mützel <mmuetzel>
Project Member
Sat 19 Aug 2017 12:17:35 PM UTC, comment #6:

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

Oliver Heimlich <oheim>
Sat 19 Aug 2017 08:38:58 AM UTC, comment #5:

Now I have pushed a patch to my repository.


Joel Dahne <urathai>
Fri 18 Aug 2017 07:50:20 PM UTC, comment #4:

The I will fix that tomorrow!

Joel Dahne <urathai>
Fri 18 Aug 2017 04:14:30 PM UTC, comment #3:

After consulting various sources, I agree that the factorial function (ℕ⊆ℝ⟶ℝ) is continuous. In IEEE Std 1788-2015 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?

Oliver Heimlich <oheim>
Fri 18 Aug 2017 11:35:37 AM UTC, comment #2:

In the documentation it says that for scalar it should be equivalent to 123..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.

Joel Dahne <urathai>
Fri 18 Aug 2017 11:15:00 AM UTC, comment #1:

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 1788-2015 regarding the definition of continuity of real functions.


Fri 18 Aug 2017 07:36:18 AM UTC, original submission:

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.

Joel Dahne <urathai>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by mmuetzel (Posted a comment)
  • -unavailable- added by oheim (Posted a comment)
  • -unavailable- added by urathai (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 20 Aug 2017 05:54:50 PM UTCmmuetzelStatusNone=>Fixed

    Back to the top

    Powered by Savane 3.1-cleanup1