You can do it in BigInteger, you just have to tell it to do the same thing as your int method. I was wrong in my first post, a.compareTo(b) compares the wrong numbers and doesn't work because of it....
Type: Posts; User: aesguitar
You can do it in BigInteger, you just have to tell it to do the same thing as your int method. I was wrong in my first post, a.compareTo(b) compares the wrong numbers and doesn't work because of it....
One thing you could try is instead of when transferring to BigInteger
while(a.compareTo(b)>0){
Try comparing it the same way with the integer gcd method. When you say...