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: Ronan Waide
Subject: Re: operation of 'round' function
Date: Thu, 7 Feb 2002 17:57:19 +0000

On February 7, ronan.waide@euroconex.com said:
> 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.
> 
> Um.
> 
> That makes no sense whatsover.
> 

Okay, I retract that, it makes partial sense:
http://dbhs.wvusd.k12.ca.us/SigFigs/Rounding.html

However.

Having straw-polled a bunch of people, the Principle of Least User
Astonishment applied to this function would be that 0.5 always gets
rounded upwards.

Cheers,
Waider.
-- 
Ronan Waide / Java Developer / euroConex Technologies Ltd.


From "-user news"@nextra.no Thu Feb 07 13:28:23 2002
Received: from chx400.switch.ch ([130.59.10.2])
        by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian))
        id 16YtHS-0002qE-00
        for <bug-gnu-emacs@prep.ai.mit.edu>; Thu, 07 Feb 2002 13:28:22 -0500
Received: from smarthost1.e.nsc.no ([193.213.112.62] helo=smarthost1.nsc.no)
        by chx400.switch.ch with esmtp (Exim 3.20 #1)
        id 16YtHR-0004Ka-00
        for gnu-emacs-bug@moderators.isc.org; Thu, 07 Feb 2002 19:28:21 +0100
Received: from news4.ulv.nextra.no (news4.ulv.nextra.no [10.122.112.21])
        by smarthost1.nsc.no (Postfix) with QMQP id 85DE871D3F
        for <gnu-emacs-bug@moderators.isc.org>; Thu,  7 Feb 2002 19:28:19 +0100 
(MET)
To: gnu-emacs-bug@moderators.isc.org
Path: 53ab2750!not-for-mail
Newsgroups: gnu.emacs.bug
Subject: Re: operation of 'round' function
References: <15458.39921.518127.876698@eris.euroconex.prv> 
<jek7tps0sz.fsf@suse.de>
 <15458.47682.187070.61634@eris.euroconex.prv>
Organization: Private
From: pjacklam@online.no (Peter J. Acklam)
Message-ID: <u66596ta6.fsf@online.no>
Lines: 20
User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1
 (i386-msvc-nt4.0.1381)
Cancel-Lock: sha1:Wm4kHNrSG9mwNwt7B3owJ2YbUmo=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
NNTP-Posting-Host: 62.92.57.66
X-Complaints-To: news-abuse@nextra.no
NNTP-Posting-Date: Thu, 07 Feb 2002 19:28:19 MET
X-Trace: news4.ulv.nextra.no 1013106499 62.92.57.66
Date: Thu, 07 Feb 2002 18:28:19 GMT
Sender: bug-gnu-emacs-admin@gnu.org
Errors-To: bug-gnu-emacs-admin@gnu.org
X-BeenThere: bug-gnu-emacs@gnu.org
X-Mailman-Version: 2.0.5
Precedence: bulk
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs>,
        <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
List-Id: Bug reports for GNU Emacs,
        the Swiss army knife of text editors <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs>,
        <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-gnu-emacs/>

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

> 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.

If all they have is basic math, and/or little experience with
rounding, then yes, I guess you are right.

However, if you ask people who have been working with the details
on rounding in several different languages and know about the
relavant parts of the POSIX and IEEE standards, you will probably
not get that answer.

Peter

-- 
I put the batteries the wrong way in my flashlight.
Now when I turn it on, it gets dark.



reply via email to

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