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: Andreas Schwab
Subject: Re: operation of 'round' function
Date: Fri, 08 Feb 2002 13:09:36 +0100
User-agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.2.50 (ia64-suse-linux)

address@hidden writes:

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

Probably because NT does not provide the function rint, so Emacs falls
back using floor(x + 0.5).

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 N├╝rnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

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