Accurate way to compute the sum of exponentials
Let $a = \max_i a_i$. Then your expression is equal to 
$$
a + \log_2 \frac{\sum_i 2^{a_i-a}}{n},
$$
and this should be a very good approximation (this is "renormalization"). Don't forget to add the numbers in decreasing order of magnitude (that is, sort the $a_i$'s so that they are in decreasing order).