Skip to content

Tag Archives: Java-BigDecimal

The java.math.BigDecimal.ulp() is an inbuilt method in Java that returns the size of an ulp(unit in the last place) of this BigDecimal. An ulp of… Read More
The java.math.BigDecimal.toBigIntegerExact() is an inbuilt method in java that converts this BigDecimal to a BigInteger, checking for lost information. An exception is thrown if this… Read More
The java.math.BigDecimal.compareTo(BigDecimal bg) method checks for equality of this BigDecimal and BigDecimal object bg passed as parameter. The method considers two equal BigDecimal objects even… Read More
The java.math.BigDecimal.toBigInteger() is an inbuilt method in jav that converts this BigDecimal to a BigInteger. This conversion is analogous to the narrowing primitive conversion from… Read More
The java.math.BigDecimal.stripTrailingZeros() is an inbuilt method in Java that returns a BigDecimal which is numerically equal to this one but with any trailing zeros removed… Read More
The java.math.BigDecimal.equals() method checks for equality of a BigDecimal value with the object passed. This method considers two BigDecimal objects equal if only if they… Read More
The java.math.BigDecimal.shortValueExact() is an inbuilt method in java that converts this BigDecimal to a short, checking for lost information. If this BigDecimal has a nonzero… Read More
The java.math.BigDecimal.signum() is an inbuilt method in Java that returns the signum function of this BigDecimal. The sign function or signum function is an odd… Read More
The java.math.BigDecimal.valueOf(long val) is an inbuilt method in java that translates a long value into a BigDecimal value with a scale of zero. It allows… Read More
The java.math.BigDecimal.byteValueExact() is an in-built function which converts the BigDecimal to a byte and checks for lost information. Any BigDecimal value greater than 127 or… Read More
The java.math.BigDecimal.abs() is used to return a BigDecimal whose value is the absolute value of the BigDecimal and whose scale is this.scale(). Syntax : public… Read More
The java.math.BigDecimal.negate() method returns a BigDecimal whose value is the negated value of the BigDecimal with which it is used. Syntax: public BigDecimal negate() Parameters:… Read More
The BigDecimal class provides operations on double numbers for arithmetic, scale handling, rounding, comparison, format conversion and hashing. It can handle very large and very… Read More