double num = 0.3;System.out.println(num);System.out.println(num - 0.2);System.out.println(num - 0.2 == 0.1);
结果为
0.30.09999999999999998false
本文共 195 字,大约阅读时间需要 1 分钟。
double num = 0.3;System.out.println(num);System.out.println(num - 0.2);System.out.println(num - 0.2 == 0.1);
结果为
0.30.09999999999999998false
转载于:https://www.cnblogs.com/TheoryDance/p/7477942.html