I am trying to determine what the maximum precision for a double is. In the comments for the accepted answer in this link Retain precision with double in Java @PeterLawrey s
The max precision of double
of is the first value greater than 0. According Double's Javadoc, this number is represented by Double.MIN_VALUE. You can output it as follows:
BigDecimal doubleMinVal = BigDecimal.valueOf(Double.MIN_VALUE);
System.out.println(doubleMinVal.toPlainString());
System.out.println(doubleMinVal.toString());
See this IDEOne program for an example.