Why is infinity's floating point representation apparently 0^n?
问题 I am trying to understand floating point representations. I do not understand the 'infinity' 'NaN' representations in floating point. I am looking at the table provided by TopCoder. Infinity is represented by an exponent of all 1s and a Mantissa of all 0s. I can only read it as 0^n, and I'm not sure how that tends to infinity. 回答1: You should simply ignore the bit patterns used and treat infinities and NaNs as special values. Unless you do bit-fiddling on your floats (for which I see very