File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed
src/main/java/com/thealgorithms/bitmanipulation Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change 2424 */
2525public final class BitwiseGCD {
2626
27- private BitwiseGCD () {}
27+ private BitwiseGCD () { }
2828
2929 /**
3030 * Computes GCD of two long values using Stein's algorithm (binary GCD).
@@ -140,17 +140,5 @@ public static BigInteger gcdBig(long a, long b) {
140140 public static int gcd (int a , int b ) {
141141 return (int ) gcd ((long ) a , (long ) b );
142142 }
143-
144- /**
145- * Demo main method. Remove in production; kept for ad-hoc running.
146- */
147- public static void main (String [] args ) {
148- System .out .println ("gcd(48, 18) = " + gcd (48L , 18L ));
149- System .out .println ("gcd(0, 5) = " + gcd (0L , 5L ));
150- System .out .println ("gcd(270, 192) = " + gcd (270L , 192L ));
151-
152- // BigInteger example with Long.MIN_VALUE
153- BigInteger g = gcdBig (Long .MIN_VALUE , 0L );
154- System .out .println ("gcdBig(Long.MIN_VALUE, 0) = " + g ); // prints 2^63
155- }
143+
156144}
You can’t perform that action at this time.
0 commit comments