It\'s know that floating point number, even those with fixed digits after decimal point in decimal format, can\'t be represented exactly. So I have the following program to test
System.out.printf
working correctly here. A reliable way to get the exact double
value you get when you write 0.1 is to write new BigDecimal(0.1).toString()
.