 
 
 
 
 
 
Re: Union & Select for removing duplicates in a list
- To: mathgroup at smc.vnet.net
- Subject: [mg47955] Re: Union & Select for removing duplicates in a list
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Sun, 2 May 2004 04:50:55 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On 4/30/04 at 7:27 PM, jerry.blimbaum at navy.mil (Blimbaum, Jerry AA
R22) wrote:
>I got list of numbers using FindRoot...which had duplicates...or,
>at least, what looked like duplicates....I used Union to sort and ,
>according to documentation, remove duplicates....but it didnt
>work.....so list , after Union, looks like this for example....
>{.0035, .0035, .005, .006...etc..}
The problem is machine precision numbers
Consider
x = .0035
y = .0035 + 10^-10
x == y
Both x and y will display as .0035 since they both equal .0035 to the default display precision. But y is 10^-10 greater than x. So evaluating x == y will give False. The point is you can have two machine precision numbers that disply in a manner that makes them appear equal when in fact they are not equal.
--
To reply via email subtract one hundred and four

