3 ms·
What does IEEE mean in this context?
by tomlock 10y ago
What does IEEE mean in this context?
- jdoliner 10y agoIEEE standard floating point semantics: https://en.wikipedia.org/wiki/IEEE_floating_point https://en.wikipedia.org/wiki/IEEE_floating_point
- pawadu 10y agoThe IEEE standard for floating point numbers has certain mathematical requirements that makes it a bit more "correct" but possibly also a bit slower. What Linus is saying [1] is that you don't need that in most applications [2] and definitely not when you specify -ffast-math [1] https://gcc.gnu.org/ml/gcc/2001-07/msg01877.html https://gcc.gnu.org/ml/gcc/2001-07/msg01877.html [2] and many agree with him, Java for example moved away from IEEE around the same time this was written.
- Loic 10y agoAnd FP in the context is Floating Point. Linus is very pragmatic in this exchange, in fact, hard numerical code, as the other person is implying in the discussion, is normally not following IEEE. Especially around zero. If your code is losing precision when you divide by something very big resulting in a zero value, you do not want to rise an exception, you just want to have zero. Numerical code is normally not following the full IEEE and ignoring the underflow and inexact exceptions. IEEE is a lot about tracking precision loss but in numerical code, precision loss is acceptable and needed (for speed) in many situations. But knowledge of the precision loss is for some people very important, this is the raison d'être of the IEEE standard.