MathGroup Archive 1998

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

Search the Archive

Re: Union[{0},{0.}] = {0,0.}?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg12726] Re: Union[{0},{0.}] = {0,0.}?
  • From: "Allan Hayes" <hay at haystack.demon.cc.uk>
  • Date: Thu, 4 Jun 1998 02:52:12 -0400
  • References: <6kvpko$7hl@smc.vnet.net> <6l2pnd$dsa@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Stephen P Luttrell wrote in message <6l2pnd$dsa at smc.vnet.net>...
>>Union[{0},{0.}] = {0,0.}.
>>
>>Why?
>>
>>I would like the above to return only {0}.
>
>Try this:
>
>Union[{0},{Chop[0.]}]
>


Stephen,

Here's a variant that let's us work from the outside

Chop[ Unevaluated[Union[{0},{0.}]] ]

{0}

Allan

------------------------------------------------------------- 
Allan Hayes
Training and Consulting
Leicester UK
http://www.haystack.demon.co.uk
hay at haystack.demon.co.uk
voice: +44 (0)116 271 4198
fax: +44(0)116 271 8642



  • Prev by Date: Re: Efficient way to merge lists--Programming help
  • Next by Date: Re: What am i missing?
  • Previous by thread: Re: Union[{0},{0.}] = {0,0.}?
  • Next by thread: IT and mathematics conference in Japan - August 1998