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: maierh
Subject: Re: operation of 'round' function
Date: 07 Feb 2002 19:29:24 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.90

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

> This may be a bug, or may simply be a failure of understanding on my
> part. However.
> 
> GNU Emacs 20.7.1 (i386-redhat-linux-gnu, X toolkit) of Mon Jul 30 2001
> on stripples.devel.redhat.com
> 
> (round 0.5) = 0
> (round 1.5) = 2
> (round 2.5) = 2
> (round 3.5) = 4
> (round 4.5) = 4
> 

FYI. The mingw NT emacs (GNU Emacs 21.1.90.1 (i386-mingw-nt5.0.2195))
produces the following output:

(round 0.5) = 1
(round 1.5) = 2
(round 2.5) = 3
(round 3.5) = 4
(round 4.5) = 5

Harald


From "-user news"@nextra.no Thu Feb 07 13:56:22 2002
Received: from mr1.ash.ops.us.uu.net ([198.5.241.86])
        by fencepost.gnu.org with smtp (Exim 3.33 #1 (Debian))
        id 16YtiX-0005Rd-00
        for <bug-gnu-emacs@prep.ai.mit.edu>; Thu, 07 Feb 2002 13:56:22 -0500
Received: from smarthost1.nsc.no by mr1.ash.ops.us.uu.net with ESMTP 
        (peer crosschecked as: smarthost1.e.nsc.no [193.213.112.62])
        id QQmbff02154
        for <gnu-emacs-bug@moderators.isc.org>; Thu, 7 Feb 2002 18:56:20 GMT
Received: from news2.ulv.nextra.no (news2.ulv.nextra.no [10.122.112.19])
        by smarthost1.nsc.no (Postfix) with QMQP id AD31D71D3F
        for <gnu-emacs-bug@moderators.isc.org>; Thu,  7 Feb 2002 19:56:16 +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> 
<uu1strvqz.fsf@myself.com>
Organization: Private
From: pjacklam@online.no (Peter J. Acklam)
Message-ID: <uy9i55df5.fsf@online.no>
Lines: 34
User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1
 (i386-msvc-nt4.0.1381)
Cancel-Lock: sha1:1v7cBiPJr4QfVbs390aXjJe7/RQ=
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:56:16 MET
X-Trace: news2.ulv.nextra.no 1013108176 62.92.57.66
Date: Thu, 07 Feb 2002 18:56:16 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/>

maierh@myself.com wrote:

> ronan.waide@euroconex.com (Ronan Waide) writes:
>
> > (round 0.5) = 0
> > (round 1.5) = 2
> > (round 2.5) = 2
> > (round 3.5) = 4
> > (round 4.5) = 4
>
> FYI. The mingw NT emacs (GNU Emacs 21.1.90.1
> (i386-mingw-nt5.0.2195)) produces the following output:
>
> (round 0.5) = 1
> (round 1.5) = 2
> (round 2.5) = 3
> (round 3.5) = 4
> (round 4.5) = 5

I guess this proves the often-cited text in the Perl
documentation.  It is equally true for Emacs.

    Rounding in financial applications can have seri-
    ous implications, and the rounding method used
    should be specified precisely.  In these cases, it
    probably pays not to trust whichever system round-
    ing is being used by Perl, but to instead imple-
    ment the rounding function you need yourself.

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]