Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

S is sign. M is mantissa. E is exponent.

The only term there you might not remember from high school math is mantissa, and a search engine will precisely explain that in two sentences, in terms you do remember from high school math.



> S is sign. M is mantissa. E is exponent.

That doesn't actually get you any closer to knowing what the formula means, though. You need to also define that M is unsigned & 23 bits and E is unsigned & 8 bits. And that alone still doesn't get across the resulting limitations like that precision reduces by half every time the exponent bumps. Sure you can reason about it if you devote the brainpower to applying the limitations to the formula, but it's not explained by the formula itself.


Yes, jordigh did post, mistakenly or deliberately, an incomplete explanation of IEEE754 single precision floats. A number line with alternative labels showing an approximate mantissa and exponent for a given float is certainly one possible way to explain the application of the spec, but obviously, not only does it give less information than the specification, it is not obvious that it is a generally better explanatory tool. For example, it certainly helps Fabien, I assume it helps you and coldtea, but it leaves me completely bewildered (I know what it says, but on it's own, I'm completely lost as to why).

edit: jordigh, not coldtea, first brought up the formula in his argument


>not only does it give less information than the specification

That's generally considered a plus (if not a sine qua non) for a simplified explanation, and the larger the specification, the bigger plus.

Else, one might as well read the 100s of pages of specs.



A search engine will also show that the use of the word "mantissa" in relation to floating point numbers is discouraged in favor of "significand".

"it is an abuse of terminology to call the fraction part a mantissa, since this concept has quite a different meaning in connection with logarithms"[1] –DEK

[1] https://en.wikipedia.org/wiki/Significand#Use_of_.22mantissa...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: