Function: minus(sum(2 *(numbers('yxy') if numbers("per") > mean(numbers("per"), numbers('yxy')) else numbers('yxr')), numbers('yxr') if mean(numbers("per"), numbers('yxy')) > numbers("per") else numbers('yxy')), 2 *(numbers('yxy') if numbers('yxr') > numbers("per") else mean(numbers("per"), numbers('yxy'))))