双64位最小值的位模式是什么? [英] What's the bit pattern for minimal value in double 64 bit

查看:120
本文介绍了双64位最小值的位模式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我假设可以放入双浮点的最小正值是这个

$ $ $ $ $ $ $ $ 00000000000000000000000000000000000000000000000000000000

科学形式是这样的:

pre > 1 x 2 ^ { - 1023}

然而,这篇文章指出:


如上所述,由于假设前导1(我们需要指定一个
真零尾数),所以零不能直接表示为
格式产生零值)。零是一个特殊值
,用所有零位的指数字段表示,所有零位的分数字段

那么minival积极值的模式是什么?

解决方案

当指数部分全为零时,数字是 subnormals denormals ,其中隐式数字是0而不是1.因此

  0 00000000000 0000000000000000000000000000000000000000000000000000 

是零,下一个数字

  0 00000000000 00000000000000000000000000000000000000000000000000000001 

是最小的正数,等于:

0.0000000000000000000000000000000000000000000000000001 2 = -1010 2 = -1074 &about; 5.0× 10 -324


UPDATE:那么为什么指数是-1022,那么偏差是1023呢?次正常指数与正常花车的第一个 badede 指数相同(所以1-1023 = 1022) 。这是传播是连续的,即最大的低于正常值是

0.1111111111111111111111111111111111111111111111111111 <2> - > 2 <-10-22

和下一个浮点数(最小正常值):

1.00 00000000000000000000000000000000000000000000000000 2 >× 2 -1022


I assumed that the minimal positive value that can be put into double floating point is this

0 0000000000 00000000000000000000000000000000000000000000000000000

And in scientific form it's this:

1 x 2^{-1023}

However, this article states that:

As mentioned above, zero is not directly representable in the straight format, due to the assumption of a leading 1 (we'd need to specify a true zero mantissa to yield a value of zero). Zero is a special value denoted with an exponent field of all zero bits, and a fraction field of all zero bits.

So what's the pattern for minival positive value?

解决方案

When the exponent part is all zero, the numbers are subnormals or denormals, where the implicit digit is 0 instead of 1. Therefore

0 00000000000 0000000000000000000000000000000000000000000000000000

is zero, and the next number

0 00000000000 0000000000000000000000000000000000000000000000000001

is the smallest positive number, being equal to

0.00000000000000000000000000000000000000000000000000012×2-1022 = 2-1074 ≈ 5.0×10-324

UPDATE: so why is the exponent -1022, when the bias is 1023? The subnormals have the same exponent as the first binade of normal floats (so 1-1023 = 1022). This is so that the spread is continuous, i.e. the largest subnormal is

0.11111111111111111111111111111111111111111111111111112×2-1022

and the next floating point number (the smallest normal):

1.00000000000000000000000000000000000000000000000000002×2-1022

这篇关于双64位最小值的位模式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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