Add logic to solve logs and pi.