标签: java parsing double decimal rounding
一些例子:
double a = Double.parseDouble("53.82233040000000557"); System.out.println(a); output: 53.822330400000006 double b = Double.parseDouble("53.82274970000000280"); System.out.println(b); output: 53.8227497
为什么他们会四舍五入,我该如何防止这种情况发生?