| Karim Belabas on Tue, 16 Jul 2024 10:18:31 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: vector of t_FRAC questions |
* hermann@stamm-wilbrandt.de [2024-07-16 00:57]:
[...]
> Simple gcd help does not mention x being t_VEC:
>
> ? ?gcd
> gcd(x,{y}): greatest common divisor of x and y.
This is intentional: simple help recalls the most basic use (ideally
1-line help, using 80 characters at most...). It's intended as a quick
check for function syntax and prototype.
Here one sees that the y argument is optional (since it is between braces) but
cannot infer what this means from the simple help.
> Detailed doc "??gcd" mentions t_VEC only if x and y are passed.
Not sure what you mean here:
(08:44) gp > ??gcd
gcd(x,{y}):
Creates the greatest common divisor of x and y. If you also need the u and v
such that x*u + y*v = gcd(x,y), use the gcdext function. x and y can have
rather quite general types, for instance both rational numbers. If y is omitted
and x is a vector, returns the gcd of all components of x, i.e. this is
equivalent to content(x). [...]
Cheers,
K.B.
--
Pr. Karim Belabas, U. Bordeaux, Vice-président en charge du Numérique
Institut de Mathématiques de Bordeaux UMR 5251 - (+33) 05 40 00 29 77
http://www.math.u-bordeaux.fr/~kbelabas/