[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: operation of 'round' function
From: |
David Kastrup |
Subject: |
Re: operation of 'round' function |
Date: |
08 Feb 2002 15:11:09 +0100 |
"Eli Zaretskii" <eliz@is.elta.co.il> writes:
> > From: David.Kastrup@t-online.de (David Kastrup)
> > Date: 08 Feb 2002 11:35:28 +0100
> >
> > > Rounding a value equidistant between two integers may choose the
> > > integer closer to zero, or it may prefer an even integer, depending on
> > > your machine. For example, \(round 2.5\) can return 3 on some
> > > systems, but 3 on others.
> >
> > You mean, it can return 3 on some systems and 2 on others.
>
> Yes ;-)
>
> > Apart from
> > which almost *no* machine will choose the integer *closer* to zero
> > when rounding. Those machines not rounding to even will round *away*
> > from zero in almost all cases.
>
> See the message by Andreas: it happens on Windows, because the
> fallback method is used.
See the message by Andreas: it does not happen on Windows because the
fallback method is used.
The fallback rounds towards infinity, *not* towards zero.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: David.Kastrup@t-online.de
Re: operation of 'round' function, Andreas Schwab, 2002/02/07
Re: operation of 'round' function, David Kastrup, 2002/02/07
Re: operation of 'round' function, Al Petrofsky, 2002/02/07