def diff(x, tau, alpha_true, p):
    alpha = alpha_apprx_x(tau, x)
    rel_diff = np.abs(alpha_true - alpha)/np.abs(alpha_true)
    max_diff = np.max(rel_diff)
    mean_rel_diff = np.mean(rel_diff)
    return p*mean_rel_diff + (1-p)*max_diff
dataset/ETHPy150Open cimatosa/jobmanager/examples/advanced/calculations.py/diff/original