On 13/08/12 20:04, Walter Bright wrote:
That's called "rounding". But rounding always implies some, small, error that
can accumulate into being a very large error.

Well, yes. I was just remarking on the choice of rounding and the motivation behind it.

After all, you _could_ round it instead as,

    x = 1.0/9.0 == 0.11111111111111 ... 111  [finite number of decimal places]

but then

    9*x == 0.999999999999 ... 9999   [i.e. doesn't multiply back to 1.0].

... and this is probably more likely to result in undesirable error than the other rounding scheme. (I think the calculator app on Windows used to have this behaviour some years back.)

Reply via email to