title: How to avoid numerical overflow in log of absolute value of sum of cubes?
body: <p>I'm interested to compute a quantity log(| sum_i [(x_i)^3] |); The problem of directly using <code>np.log(abs((x**3).sum()))</code> (where x is a array of elements, and x**3 is to apply cube function element wisely to the array) is that some values in <code>x**3</code> could be so large and has potential numerical issues.</p>
  
  <p>My plan is to use <code>logsumexp</code> trick. However, the absolute value outside of the sum is hard to get rid of. Any help?</p>