Union and SameTest

Q: I want to apply [Graphics:inoutcgr1.gif] to a list of real numbers in which many duplicates occur. However, small differences between the numbers cause some of the duplicates to be retained instead of discarded. Suppose the list is

[Graphics:inoutcgr3.gif][Graphics:inoutcgr2.gif]
[Graphics:inoutcgr3.gif][Graphics:inoutcgr4.gif]

My present method is to apply [Graphics:inoutcgr5.gif] to the numbers.

[Graphics:inoutcgr3.gif][Graphics:inoutcgr6.gif]
[Graphics:inoutcgr3.gif][Graphics:inoutcgr7.gif]

Is there a better method?

Adam Strzebonski (adams@wolfram.com) answers: [Graphics:inoutcgr8.gif] uses [Graphics:inoutcgr9.gif] to decide which elements should be considered equal. Here is a [Graphics:inoutcgr10.gif] that does what you want:

[Graphics:inoutcgr3.gif][Graphics:inoutcgr11.gif]
[Graphics:inoutcgr3.gif][Graphics:inoutcgr12.gif]
[Graphics:inoutcgr3.gif][Graphics:inoutcgr13.gif]