       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:=
> =C2=A0 =C2=A0 =C2=A0 -Infinity < -8
> Out=
> =C2=A0 =C2=A0 =C2=A0 True
>
> In:=
> =C2=A0 =C2=A0 =C2=A0 Sort[{-Infinity, -8, 5}]
> Out=
> =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

```

• Prev by Date: Re: Problems with simplify and Sqrt[a^2]
• Next by Date: Re: fastest way to add up a billion numbers
• Previous by thread: Re: Sort with -Infinity fails
• Next by thread: Interrupt Service Routines in Mathematica v.5.2?