MathGroup Archive 2010

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

Search the Archive

Re: Peculiar output from Union ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108506] Re: Peculiar output from Union ?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sun, 21 Mar 2010 02:04:46 -0500 (EST)

It did exactly what the documentation said that Union would do. It joined the elements of the two "lists" (the heads of the "lists" do not have to be List but they must be the same), then sorted the distinct joined elements. All of the numbers are ordered before x so you are just left with 5 < x.

Union[1 < x < 2, 3 < x < 5] // Trace

{HoldForm[Union[1 < x < 2, 
       3 < x < 5]], HoldForm[
     1 < 2 < 3 < 5 < x], 
   HoldForm[5 < x]}


Bob Hanlon

---- Jack L Goldberg 1 <jackgold at umich.edu> wrote: 

=============
Hi Folks,

Can anyone explain this:

In[1]:= Union[  1 < x < 2, 3 < x < 5  ]

Out[1]= 5 < x

??

I am using a MacBook Pro, OS 10.6.2

Thanks,

Jack




  • Prev by Date: Re: Peculiar output from Union ?
  • Next by Date: Re: Need larger window for Manipulate Slider Control
  • Previous by thread: Re: Peculiar output from Union ?
  • Next by thread: Re: Peculiar output from Union ?