Double.MIN_NORMAL和Double.MIN_VALUE之间的区别? [英] Difference between Double.MIN_NORMAL and Double.MIN_VALUE?

查看:1330
本文介绍了Double.MIN_NORMAL和Double.MIN_VALUE之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以知道中有什么区别? Double.MIN_NORMAL (1.6中引入)和 Double.MIN_VALUE

May I know what is the difference among Double.MIN_NORMAL (introduced in 1.6) and Double.MIN_VALUE?

JavaDoc Double.MIN_NORMAL


一个常量,持有
最小的正常正常值
类型 double ,2 -1022

JavaDoc Double.MIN_VALUE

JavaDoc of Double.MIN_VALUE:


一个持有
的常量,
的最小正非零值$ double ,2 -1074


推荐答案

答案可以在 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.

这篇关于Double.MIN_NORMAL和Double.MIN_VALUE之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆