Default Division - abranhe/bigdecimal GitHub Wiki
Division between two BigDecimal numbers
public static BigDecimal divide(BigDecimal x, BigDecimal y);
Parameters:
- x - Big decimal number
- y - Big decimal number
Default
scale-5
roundingMode-CEILING
Returns:
Division of x
by y
Example
import com.abranhe.bigdecimal.Operations;
import java.math.BigDecimal;
public static void main(String[] args){
BigDecimal x = new BigDecimal("124567890.0987654321");
BigDecimal y = new BigDecimal("987654321.123456789");
System.out.println(Operations.divide(x, y));
//=> 0.12613
}