IEEE754浮点数
将十进制数转化为单精度浮点数
方法:除2取余,直到需要的精度为止
5.75 01000000101110000000000000000000
161.875 01000011001000011110000000000000
-0.0234375 10111100110000000000000000000000
在http://www.weitz.de/ieee/中验证:
![](https://img2023.cnblogs.com/blog/3268241/202310/3268241-20231015213210761-413014057.png)
将十进制数转化为单精度浮点数
方法:除2取余,直到需要的精度为止
5.75 01000000101110000000000000000000
161.875 01000011001000011110000000000000
-0.0234375 10111100110000000000000000000000