import math


def round_to_significant(num, sig_figs):
    """Return (rounded_num, format_precision).

    rounded_num is num rounded to sig_figs significant figures.
    format_precision is the number of digits to format after the decimal.
    """
    sig_digit = int(math.floor(math.log10(abs(num))))
    sig_digit -= sig_figs - 1
    prec = -sig_digit if sig_digit < 0 else 0
    return round(num, -sig_digit), prec