[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: operation of 'round' function
From: |
Francesco Potorti` |
Subject: |
Re: operation of 'round' function |
Date: |
08 Feb 2002 13:43:27 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.90 |
"Eli Zaretskii" <eliz@is.elta.co.il> writes:
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.
The Emacs primitive simply calls `rint', which works according to the
current rounding mode.
Are we sure that this is a good solution? Generally speaking, an Elisp
program should behave the same on any platform. This is not exactly
possible for floating point, so maybe you consider this as an instance
of the general floating point problem?
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
Message not available