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: 09 Feb 2002 10:13:14 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.90

pjacklam@online.no (Peter J. Acklam) writes:

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

perl behaves the same as emacs

  perl, v5.6.1 built for MSWin32-x86-multi-thread prints the same as
  NT emacs.

  perl, v5.6.1 built for cygwin-multi prints the same as the
  unix emacs. 

  So it's a little bit more consistent :).

Harald



reply via email to

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