且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Double.MIN_NORMAL和Double.MIN_VALUE之间的区别?

更新时间:2021-12-29 08:22:32

答案可以在 IEEE浮点数表示法

The answer can be found in the IEEE specification of floating point representation:


对于单一格式,正常数字和次正常数之间的差异在于领先正常数字的有效位(二进制点的左侧位)的位为1,而正常数字的有效位的前导位为0.单格式次正规数称为IEEE标准中的单格式非规格化数754。

换句话说, Double.MIN_NORMAL 您可以表示的最小可能数字,前提是您在二进制点前面有一个(在十进制系统中称为小数点)。虽然 Double.MIN_VALUE 基本上是您可以代表没有此约束的最小数字。

In other words, Double.MIN_NORMAL is the smallest possible number you can represent, provided that you have a 1 in front of the binary point (what is referred to as decimal point in a decimal system). While Double.MIN_VALUE is basically the smallest number you can represent without this constraint.