Am 4 Oct 2006 um 6:49 hat Barton Willis geschrieben:
> In case of a tie, I believe the convention is to round to the
> nearest even integer. So round(x) = floor(x+1/2) isn't an
> identity.
I'm a little bit confused here. I have learnt in school, that round(2.5)=3.
My Excel says 3, OpenOffice Calc and my Java Compiler too.
But Mathematica says 2.
WTF is this?
Is there any logical reason for
round(2.4)-round(1.4)=1
round(2.5)-round(1.5)=0
round(2.6)-round(1.6)=1 ???
I think that a good reference for this is
> "Concrete Mathematics," by Graham et al. (I don't have
> a copy to look at right now.) Another reference
> is the NMC (http://www.nmconsortium.org/), but
>
> http://www.nmconsortium.com/docs/NMC%20Technical%20Specification%20v1.0%20_DRAFT.pdf
>
>
> doesn't seem to mention the round to even rule.
>
> One more thing: the NMC document says that 'fix' should round towards
> zero. Our fix is a floor, I believe.
Yes, that's true.
> Of course, with the related, but different functions round, floor, ceiling,
> fix, entier, and truncate, we can generate expressions that vanish
> that Maxima won't be able to crunch to zero. And that's bad.
Can you give an example please?
Volker
> Barton
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima