浮點數表示標準

IEEE Standard 754 Floating Point Numbers

http://steve.hollasch.net/cgindex/coding/ieeefloat.html

根據標準,一些浮點數的二進制表示

  0      0x00000000
  1.0    0x3f800000
  0.5    0x3f000000
  3      0x40400000
  +inf   0x7f800000              //正無窮
  -inf   0xff800000                //負無窮
  +NaN   0x7fc00000 or 0x7ff00000            //Not a Number

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章