from typing import Any
import decimal


def reduce_decimal(num: Any, prec: int = 2) -> str:
    """Return a given number with precision or cut trailing zeros if possible.

    :param num: Number given, anything that can be turned into a decimal.
    :param prec: given precision.

    :return: Number with at most the given precision.
    """
    dec = decimal.Decimal(f"{num:.{prec}f}").normalize()
    return str(dec)