def ear(APN, N):
    """
    EAR - Effective Annual Interest Rate 
    
    Returns the EAR given the APN

     :param APN: APN Interest Rate as fraction
     :param N:   compound Frequency thats is equal to a year
     :return:    Effective annual interest rate

    Example:
        
        Consider a stated annual rate of 10%. Compounded 
        yearly, this rate will turn $1000 into $1100. 
        However, if compounding occurs monthly, $1000 would 
        grow to $1104.70 by the end of the year, rendering 
        an effective annual interest rate of 10.47%.
        
        >>> ear(0.1, 12)  # 10% compound monthly, result 10.47%
        0.10471306744129683


    """
    return (1.0 + APN / N) ** N - 1