
3 Aug
2009
3 Aug
'09
4:25 p.m.
Matthias Görgens schrieb:
Round-to-even means x.5 gets rounded to x if x is even and x+1 if x is odd. This is sometimes known as banker's rounding.
OK. That's slightly unusual indeed.
Modula-3 makes it too. Accidentally, I recently had a case where this rounding mode was really bad. I wanted to reduce pictures by arbitrary factors and for the sake of speed it was enough to just move the pixels from the source to their target position and don't do any interpolation. However for factor 2 reduction I got ugly patterns, because pixels accumulated around even target coordinates.