I looked around and found other questions that had answers but none of them address the scope of this particular question., including this question, and also this one. I have to compute the LCM of large ranges of numbers in an efficient way. I didn’t look too in-depth at those other questions because they don’t deal with ranges of numbers
Tag: biginteger
Converting from Integer, to BigInteger
I was wondering if there was any way to convert a variable of type Integer, to BigInteger. I tried typecasting the Integer variable, but i get an error that says inconvertible type. Answer The method you want is BigInteger#valueOf(long val). E.g., Making a String first is unnecessary and undesired.