Top "Greatest-common-divisor" questions

The greatest common divisor (GCD) of two or more non-zero integers, is the largest positive integer that divides the numbers without a remainder.

Finding the GCD without looping - R

So I'm trying to learn R and using a number of resources including a book called "Discovering Statistics using R" …

r greatest-common-divisor
Look for the GCD (greatest common divisor) of more than 2 integers?

I already have a function that finds the GCD of 2 numbers. function getGCDBetween($a, $b) { while ($b != 0) { $m = $a % $b; $…

php math greatest-common-divisor
How does the Euclidean Algorithm work?

I just found this algorithm to compute the greatest common divisor in my lecture notes: public static int gcd( int …

java algorithm greatest-common-divisor
"Approximate" greatest common divisor

Suppose you have a list of floating point numbers that are approximately multiples of a common quantity, for example 2.468, 3.700, 6.1699 which …

algorithm language-agnostic math floating-point greatest-common-divisor
How to get the (Greatest Common Divisor)GCD of Doubles

This is a simple task but i can't seem to figure out how to do it Here is a sample …

algorithm greatest-common-divisor
Using Euclid Algorithm to find GCF(GCD)

I am trying to write a function to find the gcd of 2 numbers, using Euclid's Algorithm which I found here. …

c++ algorithm greatest-common-divisor