Search code examples
floating-pointroundingfpu

Difference between FPU rounding and tie breaking


What (if any) is the difference between the rounding to integer and tie-breaking modes, described in the wikipedia article? In the IEEE-754-2008 standard, there is no such differentiation (although I only scanned it briefly). There is no such differentiation in x86 FPU control word either.

So is it possible to have an architecture that rounds integers differently than it breaks ties? Are there any such architectures used nowadays?


Solution

  • Rounding to integer is rounding to integer. There are several ways of doing it; the article lists five of them. If you choose round-to-nearest, there will be ties (0.5), and you have to handle those ties using a tie-breaking rule. There are several ways of doing that, too, and the article lists some of them.