uni = Union[list, SameTest -> (Abs[#1 - #2] < 10^-4 &)] [![enter image description here][1]][1] Total[Range[4, 1, -1] E^(uni/t)] [![enter image description here][2]][2] [1]: https://i.sstatic.net/cDsdT.jpg [2]: https://i.sstatic.net/JVZ5Q.jpg