MathGroup Archive 1999

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

Search the Archive

Sort

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19152] Sort
  • From: "Hermann Meier" <hmeier at webshuttle.ch>
  • Date: Thu, 5 Aug 1999 23:58:54 -0400
  • Organization: EUnet AG
  • Sender: owner-wri-mathgroup at wolfram.com

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




  • Follow-Ups:
    • Re: Sort
      • From: "Wolf, Hartmut" <hwolf@debis.com>
  • 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