Function: sum(minus(numbers('ryy') if sqrt(numbers("xxr")) if numbers("xxr") > numbers('ryy') else numbers('ryy') > numbers("xxr") else sqrt(numbers("xxr")), numbers("xxr") if numbers('ryy') > sqrt(numbers("xxr")) else numbers('ryy')), numbers("xxr") if numbers('ryy') > numbers('ryy') else sqrt(numbers("xxr")) if sqrt(numbers("xxr")) > numbers('ryy') else numbers("xxr"))