什么是亚正规浮点数? [英] What is a subnormal floating point number?
问题描述
isnormal()参考页告诉您:
确定给定的浮点数arg是否正常,即
既不为零,也不为正,无穷大,也不为NaN。
数字为零,无限或NaN清楚什么意思。但它也说subnormal。在IEEE754标准中,浮点数用二进制科学记数法表示,
= M × 2 e 。这里 M 是尾数, e 是指数。在数学上,您可以随时选择指数,以便1 <2>。但是,由于在计算机表示中,指数只能具有有限范围是大于零,但小于1.0 × 2 min 的一些数字。这些数字是子字幕或。实际上,尾数存储时没有前导1,始终为前1,除非为正常数字(和零)。因此,解释是如果指数是非最小的,则存在隐式前导1,并且如果指数最小,则不存在,并且数字是次正常的。
*)更一般地说,1 M < B 对于任何基本的 科学记数法。
isnormal() reference page tells :
Determines if the given floating point number arg is normal, i.e. is neither zero, subnormal, infinite, nor NaN.
A number being zero, infinite or NaN is clear what is means. But it also says subnormal. When is a number subnormal?
In the IEEE754 standard, floating point numbers are represented as binary scientific notation, x = M × 2e. Here M is the mantissa and e is the exponent. Mathematically, you can always choose the exponent so that 1 ≤ M < 2.* However, since in the computer representation the exponent can only have a finite range, there are some numbers which are bigger than zero, but smaller than 1.0 × 2emin. Those numbers are the subnormals or denormals.
Practically, the mantissa is stored without the leading 1, since there is always a leading 1, except for subnormal numbers (and zero). Thus the interpretation is that if the exponent is non-minimal, there is an implicit leading 1, and if the exponent is minimal, there isn't, and the number is subnormal.
*) More generally, 1 ≤ M < B for any base-B scientific notation.
这篇关于什么是亚正规浮点数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!