bugGNU Octave - Bugs: bug #56629, 'inverse' is referenced in a few...

 
 

bug #56629: 'inverse' is referenced in a few places, but is an undocumented alias for 'inv'

Submitter:  Mike Miller <mtmiller>
Submitted:  Sun 14 Jul 2019 07:40:58 PM UTC
   
 
Category:  Documentation Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 5.1.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 16 Jul 2019 05:24:06 PM UTC, comment #4: 

Looks good to me, thanks

Mike Miller <mtmiller>
Group Member
Mon 15 Jul 2019 09:00:59 PM UTC, comment #3: 

Easy enough.  I changed all instances of "inverse (" to "inv (" in m-files and documentation.  I added an example calling form "inverse" to the documentation for inv() and also a note explaining that "inverse" is an alias for "inv".  This also has the effect of adding an entry for "inverse" in the function index.  See https://hg.savannah.gnu.org/hgweb/octave/rev/7f5008aec7a1.

Marking as Ready for Test.

Rik <rik5>
Group administrator
Mon 15 Jul 2019 06:36:49 PM UTC, comment #2: 

Personally I find the use of a widely accepted identifier for a well-known mathematical concept like "inverse" for some IMO relatively obscure function in some toolbox not so very appropriate. I think it's a poor, unpractical and perhaps careless choice, to say the least. But of course, this is Matlab.

FWIW, in Matlab r2019b prerelease (w/o toolboxes), "doc inverse" brings up an overview of the docs for inv, asinh, ifft, atanh, and many more "inverse" functions (87 in total), but no mention of "inverse" as a function name.

I wouldn't mind (also in my role as OF mapping package maintainer) to use "inverse" in the docs where appropriate to refer to the linear algebra operation and inverse functions in core Octave's documentation, but avoid using it as a function name proper, similar to what Matlab does. So, apart from:

>> which inverse
'inverse' is a built-in function from the file libinterp/corefcn/inv.cc


... I think Octave is already OK.

Probably it'll be quite some time before "inverse" gets implemented in the mapping package anyway.

Philip Nienhuis <philipnienhuis>
Group Member
Mon 15 Jul 2019 04:40:08 PM UTC, comment #1: 

Maybe to not get in conflict with future attempts to be compatible to some Matlab function "inverse" from some "map.geodesy.authaliclatitudeconverter" class of the Mapping toolbox

https://www.mathworks.com/help/map/ref/map.geodesy.authaliclatitudeconverter.inverse.html?searchHighlight=inverse&s_tid=doc_srchtitle

Octave should avoid this alias and not further document or populate it.

Currently the OF mapping package does not implement this function or class https://octave.sourceforge.io/mapping/overview.html

Kai Torben Ohlhus <siko1056>
Group Member
Sun 14 Jul 2019 07:40:58 PM UTC, original submission:  

The 'inv' function is well-known and documented. The 'inverse' name is a simple alias for 'inv', but it is completely undocumented in the user manual. 'help inverse' shows the docstring for 'inv', but 'doc inverse' falls back to the concept index and lands on 'pinv'.

Do we want 'doc inverse' to work, or for 'inverse' to appear in the function index? Or do we want it to be omitted from the manual intentionally?

Aside from that question, at a minimum I think we should change 'inverse' to 'inv' in the two files expr.txi and invhilb.m.

This bug report was inspired by a question in #octave by Labu.

Mike Miller <mtmiller>
Group Member

 

(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

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by siko1056 (Posted a comment)
  •  

    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 group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-07-16 mtmiller StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2019-07-15 rik5 StatusNeed Info Ready For Test
    2019-07-15 siko1056 StatusNone Need Info
    2019-07-14 mtmiller Carbon-CopyRemoved 80942 -

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code