hermann on Tue, 16 Jul 2024 10:58:42 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: vector of t_FRAC questions |
On 2024-07-16 10:18, Karim Belabas wrote:
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 isequivalent to content(x). [...] Cheers, K.B.
Thanks, you are absolutely right.I am victim of very slow dvi viewer that gets opened on "??gcd", which displays
at a very small font. Increasing window and zooming takes a lot of time.I missed that last sentence you showed, which describes behavior exactly.
How can I get "??gcd" help in terminal instead of dvi viewer?Nice, "d/gcd(d)" seems to always scale (valid) vector of t_FRAC to vector of t_INT:
$ gp -q ? d=[5/2,7/3] [5/2, 7/3] ? gcd(d) 1/6 ? d/gcd(d) [15, 14] ? Regards, Hermann.