Flavours of rounding

How often do you round various numbers in your day-to-day job? Do you know what type of rounding do you actually use? Let’s compare several programming languages and their default (meaning without additional parameters if the rounding function allows it) rounding techniques. I’ll use two notions of rounding: banker’s rounding and round half up. More info about different techniques can be found on Wikipedia. .NET In dotnet (Framework, Core, 5+) banker’s rounding is used by default....

August 20, 2021 · 2 min