bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: operation of 'round' function


From: Al Petrofsky
Subject: Re: operation of 'round' function
Date: 07 Feb 2002 13:07:41 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50

ronan.waide@euroconex.com (Ronan Waide) writes:

> On February 7, schwab@suse.de said:
> > 0.5 is exactly halfway between 0 and 1, so the additional rule is that in
> > case of a tie the even number is used.
> 
> That makes no sense whatsover.
> 
> If you ask any person who's done basic fractional math, or indeed any
> language other than elisp that supports the concept of rounding
> fractional numbers, you will find that 0.5 is /always/ rounded up.

> -- 
> Ronan Waide / Java Developer / euroConex Technologies Ltd.
                ??????????????

Java Language Specification, section 4.2.4:

   The Java programming language requires that floating-point
   arithmetic behave as if every floating-point operator rounded its
   floating-point result to the result precision. Inexact results must
   be rounded to the representable value nearest to the infinitely
   precise result; if the two nearest representable values are equally
   near, the one with its least significant bit zero is chosen. This
   is the IEEE 754 standard's default rounding mode known as round to
   nearest.

-- 
Al Petrofsky / Z-80 Assembly Developer / inexplicably unemployed



reply via email to

[Prev in Thread] Current Thread [Next in Thread]