IEEE-754中2到3之间的数字数量 [英] Number of numbers between 2 and 3 in IEEE-754
本文介绍了IEEE-754中2到3之间的数字数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
2.0 = 0x40000000
3.0 = 0x40400000
所以:
0x40400000 - 0x40000000 = 0x400000 = 4194304
答案:400万左右.
i am learning IEEE-754 representation of numbers. I know how to convert from binary to IEEE and on vice versa. Now i am trying to figure out how to find out how many numbers in single precision are for instance between 2 and 3. So, the sign will be the same for both. Fraction will be a combination i think and exponent is dependent from a proper number(because of shifts). WHat would be a clever way to do it right ? I would be grateful for any help.
解决方案
Using a handy online IEEE-754 conversion utility:
2.0 = 0x40000000
3.0 = 0x40400000
So:
0x40400000 - 0x40000000 = 0x400000 = 4194304
Answer: 4 million or so.
这篇关于IEEE-754中2到3之间的数字数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文