Ranges of floating point datatype in C?

后端 未结 6 1673
死守一世寂寞
死守一世寂寞 2020-11-30 03:49

I am reading a C book, talking about ranges of floating point, the author gave the table:

Type     Smallest Positive Value  Largest value      Precision
====         


        
6条回答
  •  自闭症患者
    2020-11-30 04:35

    These numbers come from the IEEE-754 standard, which defines the standard representation of floating point numbers. Wikipedia article at the link explains how to arrive at these ranges knowing the number of bits used for the signs, mantissa, and the exponent.

提交回复
热议问题