## BigInteger sqrtAndRemainder() Method in Java with Examples

The java.math.BigInteger.sqrtAndRemainder() method performs an operation upon the current BigInteger by which this method is called. This method is used to calculate the integer square… Read More »

## BigInteger divide() Method in Java with Examples

The java.math.BigInteger.divide(BigInteger val) is used to calculate the division of two BigIntegers. BigInteger class internally uses array of integers for processing, the operation on object… Read More »

## BigInteger multiply() Method in Java with Examples

The java.math.BigInteger.multiply(BigInteger val) is used to calculate the multiplication of two BigIntegers. As BigInteger class internally uses an array of integers for processing, the operation… Read More »

## BigInteger subtract() Method in Java with Examples

The java.math.BigInteger.subtract(BigInteger val) is used to calculate the Arithmetic difference of two BigIntegers. This method is applicable on large value numbers of range much greater… Read More »

## BigInteger nextProbablePrime() Method in Java with Examples

The java.math.BigInteger.nextProbablePrime() is used to find the first integer greater than this BigInteger that is probably prime. If this method returns ‘p’ then there is… Read More »

## BigInteger add() Method in Java with Examples

The java.math.BigInteger.add(BigInteger val) is used to calculate the Arithmetic sum of two BigIntegers. This method is used to find arithmetic addition of large numbers of… Read More »

## BigInteger gcd() Method in Java with Examples

GCD (Greatest Common Divisor) or HCF (Highest Common Factor) of two numbers is the largest number that divides both of them. The java.math.BigInteger.gcd(BigInteger val) method… Read More »

## BigInteger isProbablePrime() Method in Java with Examples

The java.math.BigInteger.isProbablePrime(int certainty) method is used to tell if this BigInteger is probably prime or if it’s definitely composite. This method checks for prime or… Read More »

## Sum of first N natural numbers when N is extremely large

Given a positive integer n, the task is to find the sum of the first n natural numbers given that n is very large (1… Read More »

## BigIntegerMath divide() function | Guava | Java

The method divide(BigInteger p, BigInteger q, RoundingMode mode) of Guava’s BigIntegerMath class returns the result of dividing p by q, rounding using the specified RoundingMode.… Read More »

## BigIntegerMath ceilingPowerOfTwo() function | Guava | Java

The ceilingPowerOfTwo(BigInteger x) method of Guava’s BigIntegerMath class returns the smallest power of two greater than or equal to x. This is equivalent to BigInteger.valueOf(2).pow(log2(x,… Read More »

## BigIntegerMath binomial() function | Guava | Java

The binomial(int n, int k) method of Guava’s BigIntegerMath class returns n choose k, also known as the binomial coefficient of n and k, that… Read More »

## BigIntegerMath sqrt() function | Guava | Java

The method sqrt(BigInteger x, RoundingMode mode) of Guava’s BigIntegerMath class returns the square root of x, rounded with the specified rounding mode. Syntax: public static… Read More »

## BigIntegerMath log2() function | Guava | Java

The method log2(BigInteger x, RoundingMode mode) of Guava’s BigIntegerMath class returns the base-2 logarithm of x, rounded according to the specified rounding mode. Syntax: public… Read More »

## BigIntegerMath log10() function | Guava | Java

The method log10(BigInteger x, RoundingMode mode) of Guava’s BigIntegerMath class returns the base-10 logarithm of x, rounded according to the specified rounding mode. Syntax: public… Read More »