I have seen that such a function exists for BigInteger
, i.e. BigInteger#gcd
. Are there other functions in Java which also works for other types (int
, long
or Integer
)? It seems this would make sense as java.lang.Math.gcd
(with all kinds of overloads) but it is not there. Is it somewhere else?
(Don't confuse this question with "how do I implement this myself", please!)