Skip to content

Tag Archives: Java-BigDecimal

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
The java.math.BigDecimal.intValue() is an in-built function which converts this BigDecimal to an integer value. This function discards any fractional part of this BigDecimal. If the… Read More
The java.math.BigDecimal.longValueExact() is an in-built function which converts this BigDecimal to a long value as well as checks for lost information. This function throws Arithmetic… Read More
The java.math.BigDecimal.intValueExact() is an inbuilt function which converts this BigDecimal to an integer value as well as checks for the lost information. This function throws… Read More
prerequisite : BigDecimal Basics The java.math.BigDecimal.movePointLeft(int n) method is used to move the decimal point of the current BigDecimal by n places to the left.… Read More
Prerequisite : BigDecimal Basics The java.math.BigDecimal.movePointRight(int n) method is used to move the decimal point of the current BigDecimal by n places to the right.… Read More
The java.math.BigDecimal.precision() method returns the precision of this BigDecimal. The precision refers to the number of digits in the unscaled value. Syntax: public int precision()… Read More
The java.math.BigDecimal.round(MathContext m) is an inbuilt method in Java that returns a BigDecimal value rounded according to the MathContext settings. If the precision setting is… Read More
The java.math.BigDecimal.scale() is an inbuilt method in java that returns the scale of this BigDecimal. For zero or positive value, the scale is the number… Read More
The java.math.BigDecimal.scaleByPowerOfTen(int n) is an inbuilt method on java that returns a BigDecimal whose numerical value is equal to (this * 10n). The scale of… Read More
The java.math.BigDecimal.plus() is an inbuilt method in java that returns a BigDecimal whose value is (+this), and whose scale is this.scale(). This method, which simply… Read More
The java.math.BigDecimal.multiply(BigDecimal multiplicand) is an inbuilt method in java that returns a BigDecimal whose value is (this × multiplicand), and whose scale is (this.scale() +… Read More
The java.math.BigDecimal.doubleValue() is an in-built function which converts the BigDecimal object to a double. This function converts the BigDecimal to Double.NEGATIVE_INFINITY or Double.POSITIVE_INFINITY as appropriate… Read More
The java.math.BigDecimal.unscaledValue() is an inbuilt method in java that returns a BigInteger whose value is the unscaled value of a BigDecimal value. The value computes… Read More