Skip to content

Tag Archives: Java-math-package

The java.math.BigInteger.floatValue() converts this BigInteger to a float value. If the value returned by this function is too big for a magnitude to represent as… Read More
The java.math.BigInteger.remainder(BigInteger big) method returns a BigInteger whose value is equal to (this BigInteger % big(BigInteger passed as parameter)).The remainder operation finds the remainder after… Read More
The java.math.BigInteger.pow(int exponent) method is used to calculate a BigInteger raise to the power of some other number passed as exponent whose value is equal… Read More
The java.math.BigInteger.compareTo(BigInteger value) method Compares this BigInteger with the BigInteger passed as the parameter.  Syntax: public int compareTo(BigInteger val) Parameter: This method accepts a single… Read More
The java.math.BigInteger.intValue() converts this BigInteger to an integer value. If the value returned by this function is too big to fit into integer value, then… Read More
The java.math.BigInteger.longValue() converts this BigInteger to a long value. If the value return by this function is too big to fit into long value, then… Read More
Prerequisite: BigInteger BasicsThe Java.math.BigInteger.modPow() method returns a BigInteger whose value is (thisexponent mod m ). If exponent == 1, the returned value is (this mod m)… Read More
The java.math.BigDecimal.min(BigDecimal val) method in Java is used to compare two BigDecimal values and return the minimum of the two. Syntax: public BigDecimal min(BigDecimal val)… Read More
The java.math.BigDecimal.max(BigDecimal val) method in Java is used to compare two BigDecimal values and return the maximum of the two. This is opposite to BigDecimal… Read More
prerequisite : BigInteger Basics The java.math.BigInteger.signum() method helps us to identify whether a BigInteger is positive or zero or negative. It returns one of the following… Read More
prerequisite : BigInteger Basics The java.math.BigInteger.shiftRight(int n) method returns a BigInteger whose value is (this >> n). The shift distance, n, may be negative, in… Read More
prerequisite : BigInteger Basics The java.math.BigInteger.getLowestSetBit() method returns the index of the rightmost (lowest-order) set bit of this BigInteger. It means this method returns the… Read More
prerequisite : BigInteger Basics The java.math.BigInteger.abs() method returns absolute value of a BigInteger. By using this method one can find absolute value of any large… Read More
The java.math.BigDecimal.longValue() is an in-built function which converts this BigDecimal to a long value. This function discards any fractional part of this BigDecimal. The function… Read More
The java.math.BigDecimal.hashCode() returns the hash code for this BigDecimal. The hashcode will generally not be the same for two BigDecimal objects with equal values and… Read More

Start Your Coding Journey Now!