|
From: | John Lamb |
Subject: | Re: [Help-gsl] GCD of vector |
Date: | Mon, 30 Aug 2004 17:22:09 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114 |
Lopaka Lee wrote:
GSL vectors are doubles and so don't have a gcd. I suspect what you want is the greatest common divisor of a set of positive integers, which may be coded as a vector. Repeated application of the Euclidean Algorithm should work: http://mathworld.wolfram.com/EuclideanAlgorithm.htmlHas anyone worked out a function that finds the greatest common divisor of vector?
-- JDL
[Prev in Thread] | Current Thread | [Next in Thread] |