MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Why Round[5/2]=2?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg17502] Re: [mg17469] Why Round[5/2]=2?
  • From: "Andrzej Kozlowski" <andrzej at tuins.ac.jp>
  • Date: Mon, 10 May 1999 01:44:34 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Round rounds numbers of the form x.5 toward the nearest even integer:

In[2]:=
Round[3.5]
Out[2]=
4

In[3]:=
Round[4.5]
Out[3]=
4


--
Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp
http://eri2.tuins.ac.jp


----------
>From: xingjing at calvin.math.vt.edu (Xing Jing Li)
To: mathgroup at smc.vnet.net
>To: mathgroup at smc.vnet.net
>Subject: [mg17502] [mg17469] Why Round[5/2]=2?
>Date: Sun, May 9, 1999, 5:44 PM
>

> While  I am working on the exercises on the book _Power Programming
> with Mathematica_ I noticed that Round[5/2] gave me 2. It is obviously
> wrong. But how could this happen? I am using Mathematica 3.0.1 on a
> Macintosh. I also tried the command"Round[5/2]" on other Macintoshes
> and PCs and all them gave me 2. Is this some kind bug? Other numbers I
> tried gave me the answers I expected.
>
> Can some one tell me what is going on?
>
> Thanks,
>
> Xing Jing Li


  • Prev by Date: Re: Split
  • Next by Date: Re:Simple Question: 2graphs in one?
  • Previous by thread: Why Round[5/2]=2?
  • Next by thread: Re: Why Round[5/2]=2?