Skip to content

Tag Archives: Java-BigInteger

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
The method floorPowerOfTwo(BigInteger x) of Guava’s BigIntegerMath class returns the largest power of two less than or equal to x. This is equivalent to BigInteger.valueOf(2).pow(log2(x,… Read More
The method isPowerOfTwo(BigInteger x) of Guava’s BigIntegerMath class returns true if x represents a power of two. Syntax:   public static boolean isPowerOfTwo(BigInteger x) Parameters: This method… Read More
The method factorial(int n) of Guava’s BigIntegerMath class is used to find the factorial of the given number. It returns n!, that is, the product… Read More
java.math.BigInteger.sqrt() is an inbuilt function added in Java SE 9 & JDK 9 which returns BigInteger value of square root of a BigInteger on which… Read More
java.math.BigInteger.divideAndRemainder(BigInteger val) was introduced in Java 8. This method returns an array of two BigInteger after applying division operation between the BigInteger calling this method… Read More
java.math.BigInteger.shortValueExact() was introduced in Java 8. It is an inbuilt function which converts the value of BigInteger to a short and checks for lost information.… Read More
java.math.BigInteger.intValueExact() was introduced in Java 8. It is an inbuilt function which converts the value of BigInteger to a int and checks for lost information.… Read More
java.math.BigInteger.byteValueExact() was introduced in Java 8. It is an inbuilt function which converts the value of BigInteger to a byte and checks for any lost… Read More
java.math.BigInteger.longValueExact() was introduced in Java 8. It is an inbuilt function which converts the value of BigInteger to a long and checks for lost information.… Read More
Given a number, the task is to find the hyperfactorial of a number.The result of multiplying a given number of consecutive integers from 1 to… Read More
BigInteger Class offers 2 methods for toString(). toString(int radix): The java.math.BigInteger.toString(int radix) method returns the decimal String representation of this BigInteger in given radix. Radix… Read More
The java.math.BigInteger.toByteArray() method returns a array of byte containing the two’s-complement representation of this BigInteger. The most significant byte of byte array is present in… Read More
The java.math.BigInteger.mod(BigInteger big) method returns a BigInteger whose value is equal to (this BigInteger modfunction big(BigInteger passed as parameter)).In other words we can say that… Read More
The java.math.BigInteger.valueOf(long value) method returns a BigInteger whose value is equal to value of long passed as parameter. This method is static method so It… Read More

Start Your Coding Journey Now!