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


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

Submitter:  Joel Dahne <urathai>
Submitted:  Fri 18 Aug 2017 07:36:18 AM UTC
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


( 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: 
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 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.

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 Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.





    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-20 mmuetzel StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.9