DirectDrive
Programmer
I have seen a lot of confusion over the Round function, all over the net and in various books. Some claim it does not work and others seem to have noticed the patter, but do not understand it..
Mathematically speaking the round function is correct, but it does not work how many people think it should. This is how it works…….
When a 5 is encountered it will round to the nearest even number, or it rounds even numbers down and odd numbers up (however you like to think about it). i.e. 2.5 rounds down to 2, 3.5 rounds up to 4.
Mathematicians round like this to combat mathematical bias and the VB round function is based on this theory.
Mathematically speaking the round function is correct, but it does not work how many people think it should. This is how it works…….
When a 5 is encountered it will round to the nearest even number, or it rounds even numbers down and odd numbers up (however you like to think about it). i.e. 2.5 rounds down to 2, 3.5 rounds up to 4.
Mathematicians round like this to combat mathematical bias and the VB round function is based on this theory.