Java的’Double.MIN_NORMAL`和`Double.MIN_VALUE`之间的区别?
作者:互联网
Double.MIN_NORMAL
(在Java 1.6中引入)和Double.MIN_VALUE
之间有什么区别?
解决方法:
答案可以在IEEE specification of floating point representation中找到:
For the single format, the difference between a normal number and a subnormal number is that the leading bit of the significand (the bit to left of the binary point) of a normal number is 1, whereas the leading bit of the significand of a subnormal number is 0. Single-format subnormal numbers were called single-format denormalized numbers in IEEE Standard 754.
换句话说,Double.MIN_NORMAL是您可以表示的最小可能数,前提是您在二进制点前面有一个1(在十进制系统中称为小数点).虽然Double.MIN_VALUE基本上是您可以在没有此约束的情况下表示的最小数字.
标签:java,ieee-754 来源: https://codeday.me/bug/20190926/1822169.html