Java gcd GCD(long a, long b)

Here you can find the source of GCD(long a, long b)

Description

GCD

License

Apache License

Declaration

public static long GCD(long a, long b) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static long GCD(long a, long b) {
        if (b == 0)
            return a;
        return GCD(b, a % b);
    }/*from   w w  w. j ava 2s  .  c o  m*/
}

Related

  1. gcd(int u, int v)
  2. gcd(int x, int y)
  3. gcd(int x1, int x2)
  4. gcd(int[] array)
  5. gcd(Integer... values)
  6. gcd(long a, long b)
  7. gcd(long a, long b)
  8. gcd(long a, long b)
  9. gcd(long a, long b)