bugGNU Octave - Bugs: bug #57609, Documentation of gcd

 
 

bug #57609: Documentation of gcd

Submitter:  Michael Leitner <mleitner>
Submitted:  Thu 16 Jan 2020 08:10:22 AM UTC
   
 
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 17 Jan 2020 04:23:59 PM UTC, comment #1: 

I made the change and a bit more to the documentation.   It now reads


 -- G = gcd (A1, A2, ...)
 -- [G, V1, ...] = gcd (A1, A2, ...)
     Compute the greatest common divisor of A1, A2, ....

     All arguments must be the same size or scalar.  For arrays, the
     greatest common divisor is calculated for each element
     individually.  All elements must be ordinary or Gaussian (complex)
     integers.  Note that for Gaussian integers, the gcd is only unique
     up to a phase factor (multiplication by 1, -1, i, or -i), so an
     arbitrary greatest common divisor among the four possible is
     returned.


Thanks for noticing this.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Thu 16 Jan 2020 08:10:22 AM UTC, original submission:  

At present, the documentation of gcd reads "If more than one argument is given then all arguments must be the same size or scalar." However, the function definition given in the help text defines only the multi-element syntax, which is borne out by trying


gcd([4,6])


which returns


error: Invalid call to gcd.  Correct usage is:

 -- G = gcd (A1, A2, ...)
 -- [G, V1, ...] = gcd (A1, A2, ...)


So please just change the sentence referenced above to "All arguments must be the same size or scalar."

Michael Leitner <mleitner>

 

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

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-01-17 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
        Release5.1.0 dev

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code