Re: Rounding??

On Tue, Jun 12, 2001 at 09:18:03PM +0200, Kjetil Torgrim Homme wrote:
[Nicholas Lee]

  (*) In fact its an inconsistent bug, since things like 3.555 round
  correctly at all dp, but 3.375 doesnt a 2 dp.

Correct rounding is difficult.  If a value falls exactly between the
two candidates, it should choose the candidate which is _even_.

I always thought than even given that 5 is equal distance from either 0
or 10, that it was conventional to round up.  Not create some
complication even/odd thing which would certainly be annoying say in the
middle of some measure theory. ;)

In other words, if the previous digit is odd, you should round up, but
if it is even, you should round down.  This gives a fair result when
used on prices.

  3.55 -> 3.6
  3.45 -> 3.4

Gnumeric seems to do the reverse of this. 

Just rounding 5-9 upwards is to the disadvantage of customers.

But its std practice.    Certainly my tax department might expect this

Evidently, Gnumeric doesn't do this.  I guess it would be incompatible
with Excel...

Gnumeric seems to do all sorts of things I cant quite figure out.

The _important_ thing is to have _consistent_ behaviour.  

At the moment

3.15, 3.25, 3.35, 3.45, 3.55, 3.65, 3.75, 3.85, 3.95, 4.05, 4.15 
gives me
3.1,  3.2,  3.3,  3.5,  3.5,  3.6,  3.7,  3.8,  4.0,  4.0,  4.2

which just seems confusing.  Why are 3.4 and 3.9 missed?? 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]