jdk-sourcecode-analysis
jdk-sourcecode-analysis copied to clipboard
JDK源码阅读笔记
Results
12
jdk-sourcecode-analysis issues
Sort by
recently updated
recently updated
newest added
精度问题出现的本质原因是浮点数无法精确的表示大多数十进制小数,以下面的计算为例: ```java System.out.println(81.6 * 10); System.out.println(81.6 * 100); ``` 其输出结果是: ```java 816.0 8159.999999999999 ``` 数字81.6在写出来之后就不是精确表示了,随后的计算所以也随之不准确。下面的除法是准确的: ```java System.out.println(816 / 100D); ``` 因为对于整数,816和100都是可以精确表示的,所以最后的结果便是对的。
I added missing override annotations to SomeQueue.java in order to comply with java style conventions.