經安全檢測,此網站為安全網站,請放心前往原始網址!

java - Why does Math.round(0.49999999999999994) return 1 ...

Summary. In Java 6 (and presumably earlier), round(x) is implemented as floor(x +0.5) .1 This is a specification bug, for precisely this one pathological ...

stackoverflow.com

網址安全性掃描由 google 提供