To an extent, it's going to depend on what exactly you mean by "near": 10.4 is "near" 10, but is 10.5 near 10 or 11? What about 10.4999? 10.50001?
Decide on what constitutes "nearness" and you can work from there.
Then the way I'd do it would depend on the language and / or framework I was working in: a C# solution could be one line of code, an SQL one would be longer but use the same ideas. A javascript solution would be very different!
For example, in C# it's just this:
double [] data = { 10.21313, 10.456, 10.234324, 10.45758, 11.4564747, 10.45647, 10.32425, 9.34536, 9.4578689, 100.345345, 129.3453, 1.456456, 10.345, 10.235363, 10.23425 };
var common = data.GroupBy(d => GetNearest(d)).Select(g => g.Key);
You'd have to write or replace the
GetNearest
method yourself, based on your decision as above.