def compute_seismic_energy(m):
    """
    Compute seismic energy using Gutenberg-Richter equation.

    .. math::

        log E = 11.8 + 1.5M

    where :math:`M` is Richter local magnitude  and :math:`E` is energy in ergs.

    :param m: Richter local magnitude.
    :type m: float
    :return: Seismic energy in factor of :math:`10^{12}` ergs.
    :rtype: float

    Example:

    .. code-block:: python

        from richter import compute_seismic_energy

        ml = 1.5
        energy = compute_seismic_energy(ml)
        print(energy)

    """
    return 10**(11.8 + 1.5 * m) / 10**12