implement natural, binary and custom logarithm