import math


def H2N(H, e):
    """
    Function: H2N
    Purpose: Maps the hyperbolic anomaly angle H into the corresponding
        mean hyperbolic anomaly angle N.
    Inputs:
        H = hyperbolic anomaly (rad)
        e = eccentricity (e > 1)
    Outputs:
        N = mean hyperbolic anomaly (rad)
    """
    if e > 1.0:
        N = e * math.sinh(H) - H
        return N
    raise ValueError('Error: H2N() received e = {}, the value of e should be 0 <= e < 1'.format(str(e)))