Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*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[{Pi, N[Pi]}]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg12739] Union[{Pi, N[Pi]}]
  • From: mcmcclur at bulldog.unca.edu (Mark C McClure)
  • Date: Fri, 5 Jun 1998 02:04:19 -0400
  • Organization: University of North Carolina at Asheville
  • Sender: owner-wri-mathgroup at wolfram.com

We've seen the Union[{0,0.}] disscussion.  Here's a little variation
which seems a little trickier.

In[8]:=
N[{3.141592, Pi}, 3] // Union

Out[8]=
{3.14,3.14}


In[11]:=
Union[N[{3.141592, Pi},3] , 
	SameTest -> (N[#1,3] == N[#2,3]&)]

Out[11]=
{3.14,3.14}


In[14]:=
Union[{Pi, N[Pi]} // N]

Out[14]=
{3.14159}


The last one works works, but the first one represents my situation more
accurately.

-- 
Mark McClure
Department of Mathematics
University of North Carolina at Asheville http://www.unca.edu/~mcmcclur/
mcmcclur at bulldog.unca.edu


  • Prev by Date: automatic numbering and referencing
  • Next by Date: Arrays of equations
  • Previous by thread: Re: automatic numbering and referencing
  • Next by thread: Re: Union[{Pi, N[Pi]}]