Skip to content

Tag Archives: Java-BigDecimal

The java.math.BigDecimal.divideToIntegralValue(BigDecimal divisor) is used to calculate the integer part of the quotient of two BigDecimals (this / divisor) which is rounded down. The preferred… Read More
The java.math.BigDecimal.divide(BigDecimal divisor) is used to calculate the Quotient of two BigDecimals. The Quotient is given by (this / divisor). This method performs an operation… Read More
The java.math.BigDecimal.remainder(BigDecimal divisor) is used to calculate the remainder of two BigDecimals. The remainder is given by this.subtract(this.divideToIntegralValue(divisor).multiply(divisor)). This method performs an operation upon the… Read More
The java.math.BigDecimal.divideAndRemainder(BigDecimal divisor) is used to calculate both quotient and remainder of two BigDecimals. If both the integer quotient and remainder are needed then this… Read More
The java.math.BigDecimal.setScale() is used to set the scale of BigDecimal. This method performs an operation upon the current BigDecimal by which this method is called.… Read More
The java.math.BigDecimal.toEngineeringString() method is used to represent the current BigDecimal by which this method is called into String form by using engineering notation if an… Read More
The java.math.BigDecimal.toPlainString() method is used to represent the current BigDecimal by which this method is called into String form without an exponent field. If the… Read More
The java.math.BigDecimal.sqrt(MathContext mc) is an inbuilt function added in Java SE 9 & JDK 9 which returns BigDecimal value of square root of a BigDecimal… Read More
The java.math.BigDecimal.floatValue() converts this BigDecimal to a float. If this BigDecimal has too great magnitude to represent as a float, it will be converted to… Read More
The java.math.BigDecimal.subtract(BigDecimal val) is used to calculate the Arithmetic difference of two BigDecimals. This method is used to find the arithmetic difference of large numbers… Read More
The java.math.BigDecimal.add(BigDecimal val) is used to calculate the Arithmetic sum of two BigDecimals. This method is used to find arithmetic addition of large numbers of… Read More
The java.math.BigDecimal.toString() method is used to represent the current BigDecimal by which this method is called into String form, using scientific notation if an exponent… Read More
The java.math.BigDecimal.pow(int n) method is used to calculate a BigDecimal raise to the power of some other positive number passed as parameter (this)n. This method… 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