你如何确定在32位IEEE浮点值中的集合S中有多少个整数 [英] How do you determine how many integers are in set S of all in 32-bit IEEE floating-point values
问题描述
$ b编辑:确定2 * 2 ^ 8-2 * 2 ^ 23确定所有32位IEEE浮点值
有限正浮点数的范围从2 <-149 < (最小的次正规)到2 128 128 -2 104(有限值的指数最大的数和所有位的有效数)。我们可以将它们分为三类: (一旦我们找到了这个数字,它给了我们一个搜索键找到重复的问题。) Could anybody explain to me what it is stating exactly? I know this basically means that it's single precision with 1bit sign, 8bit exponents and 23bit mantissa. Shouldn't the answer is just be 2 * 2^8-2 * 2^23? Edit:does 2 * 2^8-2 * 2^23 determine all 32-bit IEEE floating-point values The finite positive floating-point numbers range from 2-149 (the smallest subnormal) to 2128-2104 (the number with the largest exponent for finite values and a significand of all one bits). We can group them into three categories: The total for positive integers is 0 + 224-1 + (127-24+1)*223. The number of negative integers is the same, and 0 adds one more, so the grand total is 1,778,384,895. (Once we have found that number, it gives us a search key to find duplicate questions.) 这篇关于你如何确定在32位IEEE浮点值中的集合S中有多少个整数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
对于正整数是0 + 2 24 -1 +(127-24 + 1)* 2 23。负数的数量是一样的,0增加了一个,所以总数是1,778,384,895。