With monday.comâ€™s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.
import java.math.BigDecimal;
import java.math.MathContext;
public class TestD {
public static void main(String args[]){
double d1 = 100.01234567890123456789012345678901234567890123456789;
double d2 = 2.0;
double d3 = 1.0;
double d4 = 3.0;
System.out.println(d1/d2);
System.out.println(d3/d4);
BigDecimal bd1 = new BigDecimal(100.01234567890123456789012345678901234567890123456789);
BigDecimal bd2 = new BigDecimal(2.0);
BigDecimal bd3 = new BigDecimal(1.0);
BigDecimal bd4 = new BigDecimal(3.0);
System.out.println(bd1.divide(bd2));
System.out.println(bd3.divide(bd4,MathContext.DECIMAL128));
}
}
double pi = Math.PI; // prints 3.141592653589793
But, we all know pi is a Non-terminating decimal.