2 var logarithm function