IEEE中逐渐下溢和非规格化的数字 [英] Gradual underflow and denormalized numbers in IEEE

查看:641
本文介绍了IEEE中逐渐下溢和非规格化的数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读关于浮点表示和下溢/溢出的问题,并且我想到了一些有趣的东西 - 逐渐下溢。根据我的理解,渐进式下溢意味着例如减法运算x-y的结果非常小,以至于可以将其清除为0,但浮点系统产生的数量比UFL小。到处都是我读的,它是通过丢失一些准确的,这意味着一些尾数的尾数进行指数,所以我们可以有一个更小的指数? 解决方案

>有效的答案是肯定的 - 尾数的位到指数。这些被称为次正常(又名非正常)数字。例如,在IEEE双精度中,正常数的两个指数的最小次幂(具有全部53位精度的数)是2·1022·/ sup>。但是可以有效地表示2到2〜1074的幂,如非规范化的有效位中前1位的位置所规定的。所以指数2〜1023有52位精度,2〜1024有51位精度,...,2〜-1074有1一点点的精度。



(看我的文章两台计算机的外观看起来更像是一台计算机。

I was reading about floating-point representation and underflow/overflow and I ecnountered something interesting - gradual underflow. As I understand gradual underflow means that the result of, for example substraction x-y is so small that it could be flushed to 0 but floating-point system produces number that is smaller then UFL. Everywhere I read that it is made by losing some precission, it means that some bits of mantissa goes to exponent so we can have smaller exponent?

Effectively the answer is yes -- the bits of the mantissa go to the exponent. These are called subnormal (AKA denormal) numbers. For example, in IEEE double-precision, the smallest power of two exponent for a normal number -- a number with a full 53 bits of precision -- is 2-1022. But powers of two up to 2-1074 can effectively be represented, as dictated by the location of the first 1 bit in the unnormalized significand. So exponent 2-1023 has 52 bits of precision, 2-1024 has 51 bits of precision, ... , 2-1074 has 1 bit of precision.

(See my article What Powers of Two Look Like Inside a Computer to visualize this better.)

这篇关于IEEE中逐渐下溢和非规格化的数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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