我试图了解什么是次正规数,并且我想将指数固定在-127并使该数字变小,将隐式1替换为隐式0。听起来正确吗?
In the IEEE-754 basic 32-bit binary format, the exponent for a subnormal number is −126, not −127. The leading bit of the significand is indeed zero.
For any of the IEEE-754 binary formats, let:
If E is not all zeros or all ones, the value represented is a normal number. Its value is (−1) S •2 E − bias •(1+2 1− p •T). That term 1+2 1− p •T may be pictured as a one bit followed by a radix point followed by the bits of T : “1. T ”.
If E is all zeros, the value represented is zero (if T is zero) or a subnormal number. Its value is (−1) S •2 1− bias •(0+2 1− p •T). Note two changes from the normal value: The exponent is 1− bias instead of E − bias , and the leading bit is 0 instead of 1.
Note the smallest normal values and the subnormal values have an exponent of 1- bias , which is 1−127 = −126 for the 32-bit format. When transitioning from normal values to subnormal values, we do not change both the exponent and the leading bit, because that would cause a jump in the representable values. So the subnormal values have the same exponent as the smallest normal values; just the leading bit changes.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.