changeset 27954:cbabcd7bb6c3

doc: Clarify documentation of inputs for gcd (bug #57609). * gcd.cc: Note that "All inputs must be the same size or scalar".
author Rik <rik@octave.org>
date Fri, 17 Jan 2020 08:23:45 -0800
parents 55a2bbb9a71e
children 179ece36a2eb
files libinterp/corefcn/gcd.cc
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/gcd.cc	Fri Jan 17 08:12:58 2020 -0800
+++ b/libinterp/corefcn/gcd.cc	Fri Jan 17 08:23:45 2020 -0800
@@ -445,12 +445,11 @@
 @deftypefnx {} {[@var{g}, @var{v1}, @dots{}] =} gcd (@var{a1}, @var{a2}, @dots{})
 Compute the greatest common divisor of @var{a1}, @var{a2}, @dots{}.
 
-If more than one argument is given then all arguments must be the same size
-or scalar.  In this case 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.
+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.
 
 Optional return arguments @var{v1}, @dots{}, contain integer vectors such
 that,