Re: Strange behavior of Sort
- To: mathgroup at smc.vnet.net
- Subject: [mg12970] Re: [mg12941] Strange behavior of Sort
- From: BobHanlon at aol.com
- Date: Sun, 28 Jun 1998 02:51:57 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Edward,
While the list is numeric, it is not composed of numbers. Provide the
sort criteria that you want:
Sort[li, N[#1] < N[#2] & ]
Bob Hanlon
In a message dated 6/24/98 7:52:22 AM, edneuman at siu.edu wrote:
>In Mathematica 3.0:
>
>In[5]:=
>li={1/Sqrt[2], 1, -Sqrt[2]};
>
>In[7]:=
>Sort[li]//InputForm
>
>Out[7]//InputForm=
>{1, 1/Sqrt[2], -Sqrt[2]}
>
>Sort doesn't work properly on this list.