3 ms·
The article is not about binary to decimal conversion. It's about rounding the result of a division, all in binary. A decimal equivalent would be like saying 2
by tijsvd 6y ago
The article is not about binary to decimal conversion. It's about rounding the result of a division, all in binary.
A decimal equivalent would be like saying 200/3 = 66, so rounded towards zero instead of nearest. That is usually not problematic, but it can be in some situations, and in some of those, rounding to nearest can mitigate (for example, when you sum a large number of division results).
The author points out that the behaviour should be configurable, but gcc doesn't seem to honor that.