https://gaviki.com/blog/expand-the-logarithm-as-much-as-possible/