fixed ambiguous calls to log and sqrt functions