Function: 2 *(cos(minus(minus(gradient[2](numbers("yxx") if numbers("xxx") > numbers('xyy') else numbers('yxr')), numbers('xyy') if numbers('yxr') > numbers("xxx") else numbers("yxx")), gradient[2](numbers('yxr') if numbers("xxx") > numbers("yxx") else numbers('xyy')))))