简体   繁体   English

双精度浮点格式的最大和最小指数

[英]Maximum and minimum exponents in double-precision floating-point format

According to the IEEE Std 754-2008 standard, the exponent field width of the binary64 double-precision floating-point format is 11 bits, which is compensated by an exponent bias of 1023. The standard also specifies that the maximum exponent is 1023, and the minimum is -1022.根据IEEE Std 754-2008标准,binary64 双精度浮点格式的指数字段宽度为 11 位,由 1023 的指数偏差补偿。该标准还规定最大指数为 1023,并且最小值为 -1022。 Why is the maximum exponent not:为什么最大指数不是:

2^10 + 2^9 + 2^8 + 2^7 + 2^6 + 2^5 + 2^4 + 2^3 + 2^2 + 2^1 + 2^0 - 1023 = 1024

And the minimum exponent not:而最小指数不是:

0 - 1023 = -1023

The bits for the exponent have two reserved values, one for encoding 0 and subnormal numbers, and one for encoding ∞ and NaNs.指数的位有两个保留值,一个用于编码0和次正规数,另一个用于编码 ∞ 和 NaN。 As a result of this, the range of normal exponents is two smaller than you would otherwise expect.因此,正常指数的范围比您预期的要小 2。 See §3.4 of the IEEE-754 standard ( w is the number of bits in the exponent — 11 in the case of binary64 ):见§3.4的IEEE-754标准的( w是比特的指数的数量- 11中的情况下binary64 ):

The range of the encoding's biased exponent E shall include:编码的偏置指数 E 的范围应包括:

― Every integer between 1 and 2 w – 2, inclusive, to encode normal numbers ― 1 到 2 w – 2(含)之间的每个整数,用于编码正常数

― The reserved value 0 to encode ±0 and subnormal numbers ― 保留值 0 用于编码 ±0 和次正规数

― The reserved value 2 w – 1 to encode ±∞ and NaNs. ― 保留值 2 w – 1 用于编码 ±∞ 和 NaN。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 双精度浮点数如何转换为单精度浮点格式? - How are double-precision floating-point numbers converted to single-precision floating-point format? 双精度浮点的精确表示和近似表示之间的区别 - Difference between exact and approximate representation by double-precision floating-point 是否可以使用NumPy或Python中的某些其他软件包来保留特殊精度的双精度二进制浮点数 - Is it possible to get reserved special numbers of double-precision binary floating-point with NumPy or some other package in Python 我们如何需要 17 位有效的十进制数字来标识任意双精度浮点数? - How do we need 17 significant decimal digits to identify an arbitrary double-precision floating-point number? 双精度浮点比较 - Double precision floating-point comparison 使用单精度浮点系统在双精度浮点中执行add / sub / mul / div操作的简单C示例 - Simple C example of add/sub/mul/div operations in double-precision floating-points using a single-precision Floating-point system Python浮点精度格式说明符 - Python floating-point precision format specifier 将单精度浮点数转换为双精度以进行除法 - Converting single-precision floating point numbers to double-precision for division 浮点数精度 - Precision of floating-point numbers 单精度浮点格式范围 - Single-precision floating-point format Range
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM