Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

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

  • To: mathgroup at
  • Subject: [mg12662] Union[{0},{0.}] = {0,0.}?
  • From: "Chris Farr" <farr at>
  • Date: Mon, 1 Jun 1998 23:16:38 -0400
  • Sender: owner-wri-mathgroup at

Union[{0},{0.}] = {0,0.}.


I would like the above to return only {0}.

The root of the problem is that Mathematica thinks they are the same:

SameQ[{0},{0.}] = False

How can I get around this?  The following doesn't help either.

Union[{ N[0] },{0.}] = {0,0.}

Any ides out there?

  • Prev by Date: more and more hacheurs
  • Next by Date: IT and mathematics conference in Japan - August 1998
  • Previous by thread: Re: more and more hacheurs
  • Next by thread: Re: Union[{0},{0.}] = {0,0.}?