How to find log of multiplication and division