def METHOD_NAME(val: float, allow_negative: bool = False) -> str:
    if (not allow_negative and val < 0) or abs(val > 10000.0):
        return "\N{INFINITY}"
    return str(SITools.Value(val, fmt=FMT_Q_FACTOR))