2
votes

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?

2

2 Answers

2
votes

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.

2
votes

I got it figured out after some more thinking. The tie-breaking rules will only apply if round to nearest is selected. Then they help to decide what to do if the result ends up in 0.5 (may be even a floating-point result, where the .5 part is just after the least significant represented decimal).

So if the mode is one of round towards ±∞ (infinity) or towards zero, no tie-breaking occurs, ever.

Only if the mode is nearest, then there is additional choice of tie-breaking algorithms, which the Wikipedia article lists. The IEEE standard allows round to nearest, ties to nearest even or alternately ties away from zero.

I'll leave this Q&A around for whoever may find it useful.