MathGroup Archive 1999

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

Search the Archive

Sort


Sort is not reliable. Try the following (Mathematica Version 4):

In[1]:=
Sort[{0, -Sqrt[2], 5}]

Out[1]=
{0, 5, -Sqrt[2]}

In[2]:=
Sort[{0., -Sqrt[2], 5}]

Out[2]=
{0., 5, -Sqrt[2]}


One has to apply N to the list to get the correct result:

In[3]:=
Sort[N[{0., -Sqrt[2], 5}]]

Out[3]=
{-1.414213562, 0., 5.}


HM




  • Prev by Date: Re: Mathematica input from graphics tablets?
  • Next by Date: Any Hazards When Installing V3 and V4 in Parallel?
  • Previous by thread: Re: Mathematica input from graphics tablets?
  • Next by thread: Re: Sort