Half-rounding

Top Up Down  A A

Rounding occurs when a number, such as 5.032 is to be displayed with only two decimal places, e.g., as 5.03.

 

The general rule followed by Winsteps is to round to the nearest displayable value. Examples:

5.034 rounds to 5.03

5.036 rounds to 5.04

-5.034 rounds to -5.03

-5.036 rounds to -5.04

 

Rounding errors may arise with 5.035 and -5.035. Winsteps intends to round these away from zero to 5.04 and -5.04.

 

In practice, the computer arithmetic sometimes loses precision due to hardware limitations, so that 5.035 becomes an internal number like 5.034999997 - a number which is the same computationally as 5.035. But this value half-rounds to 5.03. This behavior is impossible to predict, because most displayed numbers are the result of a long chain of internal computations, .

 

Increasing the value of UDECIM= may display more decimal places, and so better display the numerical results.

 

In recent versions, Winsteps adds .0000005 to positive numbers, and subtracts that amount from negative numbers, in order that .005 will almost always round to .01.