good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Re4: Filthy Floatsby iakobski (Pilgrim) |
on Jul 17, 2001 at 15:34 UTC ( [id://97288]=note: print w/replies, xml ) | Need Help?? |
This is new to me, up to now I always rounded .5 up. But you seem to be right, e.g. Mathematica rounds in that way. The reason for this is that the rounding should not give a statistical bias - as far as I understand it.
You understand it correctly. If your number ends in exactly 5 then you should round it up half the time and down the other half of the time. You could use any handy rule for this - round to even is an easy one. You could also round the first one you come across up, the next one down and so on. -- iakobski
In Section
Seekers of Perl Wisdom
|
|