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, address@hidden said:
> On February 7, address@hidden 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 <address@hidden>; 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 address@hidden; 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 <address@hidden>; Thu,  7 Feb 2002 19:28:19 +0100 (MET)
To: address@hidden
Path: 53ab2750!not-for-mail
Newsgroups: gnu.emacs.bug
Subject: Re: operation of 'round' function
References: <address@hidden> <address@hidden>
 <address@hidden>
Organization: Private
From: address@hidden (Peter J. Acklam)
Message-ID: <address@hidden>
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: address@hidden
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: address@hidden
Errors-To: address@hidden
X-BeenThere: address@hidden
X-Mailman-Version: 2.0.5
Precedence: bulk
List-Help: <mailto:address@hidden>
List-Post: <mailto:address@hidden>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs>,
        <mailto:address@hidden>
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:address@hidden>
List-Archive: <http://mail.gnu.org/pipermail/bug-gnu-emacs/>

address@hidden (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]