且构网

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

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

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

答案可以在浮点表示的IEEE规范:

对于单一格式,普通数和次普通数之间的区别是普通数的有效位的前导位(二进制点左端的位)为1,而前导位次正规数的有效位数的值为0.单格式次正规数在IEEE标准754中称为单格式非规格化数.

换句话说,Double.MIN_NORMAL是您可以表示的最小可能数字,只要您在二进制点(在十进制系统中称为小数点)的前面有一个1.虽然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.