Re: Sort with -Infinity fails
- To: mathgroup at smc.vnet.net
- Subject: [mg73887] Re: Sort with -Infinity fails
- From: dh <dh at metrohm.ch>
- Date: Fri, 2 Mar 2007 06:45:35 -0500 (EST)
- References: <es6d0l$rmr$1@smc.vnet.net>
Hi Tom, astonishingly the following gives the correct sorted list: Sort[{-Infinity,-8,5},#1<#2&] Daniel Tom Aldenberg 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]:= > -Infinity < -8 > Out[75]= > True > > In[76]:= > Sort[{-Infinity, -8, 5}] > Out[76]= > {-8, 5, -∞} > > > Regards, > > Tom Aldenberg > > ____________________________________________________________________________ > > DISCLAIMER: http://www.rivm.nl/disclaimer.htm > >