如何1和零浮点值区分? [英] How to distinguish between 1 and zero floating-point values?

查看:132
本文介绍了如何1和零浮点值区分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这可能是一个小白的问题,但因为它不是在电子书覆盖我学习我会问它。在IEEE标准二进制浮点格式实际上重新用科学记数法presenting号码我知道,一个整数值总是假定被添加到由二进制的尾数部分示出的小数部分,不包含在二进制,那么什么混淆我是如何如何区分1和0之间的浮点值,因为我相信双方都有一个完全零位数和我在这里想分化应该由指数部分来完成,但不知道怎么办!

I know it might be a noob question but since it's not covered in the e-book I'm studying I'm gonna ask it. In IEEE standard binary floating-point format actually representing numbers by scientific notation I know that an integer value of one is always assumed to be added to the fractional part illustrated by the significand part of the binary and is not included in the binary, So what confuses me is how to How to distinguish between 1 and zero floating-point values because I assume both have a totally zero significand and I guess the differentiation here should be done by exponent part but don't know how!

推荐答案

对于零(有两个,一正一负零,在符号位不同,但必须考虑平等),有效数字的的指数均为0位,而对其中的非零值的至少一个具有1位(为值1,则指数是除了最显著个都1-位)。

For the zeroes (there are two, a positive and a negative zero that differ in the sign bit but must be considered equal), the significand and the exponent are all 0-bits, whereas for non-zero values at least one of them has a 1-bit (for a value of 1, the exponent is all 1-bits except for the most significant one).

借助在IEEE 754标准维基百科文章列出了详细的位模式。

The Wikipedia article on the IEEE 754 standard lists the exact bit patterns.

这篇关于如何1和零浮点值区分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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