MathGroup Archive 1996

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

Search the Archive

Round[1.5] != Round[3/2] = 2 ???

  • To: mathgroup at smc.vnet.net
  • Subject: [mg3486] Round[1.5] != Round[3/2] = 2 ???
  • From: Peter Foldiak <Peter.Foldiak at st-andrews.ac.uk>
  • Date: Sat, 16 Mar 1996 22:39:49 -0500
  • Organization: University of St. Andrews
  • Sender: owner-wri-mathgroup at wolfram.com

On my Unix (SG) version of Mathematica I get this strange
behaviour:

In[25]:=
Round[3/2]

Out[25]=
2

In[26]:=
Round[1/2]

Out[26]=
0

In[27]:=
Round[1.5]

Out[27]=
1

In[28]:=
Round[N[3/2]]

Out[28]=
1

The book says "Round rounds numbers of the form x.5 towards 0."
Well, sometimes, it appears. Am I doing something wrong or is this a
bug?

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: More on functions & derivatives
  • Next by Date: mathematica vs.mathcad vs. maple
  • Previous by thread: Re: More on functions & derivatives
  • Next by thread: Re: Round[1.5] != Round[3/2] = 2 ???