def fmt_reldiff()

in analysis/render.py [0:0]


def fmt_reldiff(x: np.float64) -> str:
    """Format a relative difference as a percentage"""
    if np.isnan(x):
        out = "--"
    elif np.isinf(x):
        sign = "+" if x > 0 else "-"
        out = f"{sign}∞"
    elif x == 0:
        out = "0%"
    else:
        out = format(x, "+.1%")

    return out