Function: minus(numbers('rrr') if numbers("per") > numbers("xxx") else numbers("per") if numbers("per") > mod(numbers('rrr') if numbers("xxx") > numbers("per") else numbers("per"), numbers("per")) else logn(mod(numbers("per") if numbers('rrr') > numbers("xxx") else numbers("per"), numbers("per"))), logn(mod(numbers("per") if numbers("xxx") > numbers("per") else numbers('rrr'), numbers("per"))))