Re: Sort with -Infinity fails

*To*: mathgroup at smc.vnet.net*Subject*: [mg73894] Re: Sort with -Infinity fails*From*: "Norbert Marxer" <marxer at mec.li>*Date*: Sat, 3 Mar 2007 00:47:53 -0500 (EST)*References*: <es6d0l$rmr$1@smc.vnet.net>

On 1 Mrz., 12:21, Tom Aldenberg <Tom.Aldenb... at rivm.nl> wrote: > Dear MathGroup, > > Minus Infinity (-Infinity) is smaller than -8, but Sort does not sort it = as > expected. > Is there a Real minus Infinity? > > In[75]:= > =C2=A0 =C2=A0 =C2=A0 -Infinity < -8 > Out[75]= > =C2=A0 =C2=A0 =C2=A0 True > > In[76]:= > =C2=A0 =C2=A0 =C2=A0 Sort[{-Infinity, -8, 5}] > Out[76]= > =C2=A0 =C2=A0 =C2=A0 {-8, 5, -=E2=88=9E} > > Regards, > > Tom Aldenberg > > > DISCLAIMER: =C2=A0http://www.rivm.nl/disclaimer.htm Hello Sort uses by default canonical ordering (whatever this means with respect to -Infinity). Sort[{-Infinity, -8, 5}, Less] will give what you want. Best Regards Norbert Marxer