import math


def norm_single_calculation(x, mean, standard_deviation):
    """
    Helper function that calculates normal density function for a particular
    x with a given mean and stadard deviation.
    """
    # break the normal distribution probability density function
    # into two components

    # component 1
    #   1 / (sqrt(2 * sd^2 * pi))

    # component 2
    #   e ^ (- (x - mean) ^ 2 / 2 sd^2)

    # x = decimalize(x)
    # mean = decimalize(mean)
    # standard_deviation = decimalize(standard_deviation)

    # before we do a lot of math, let's check if sd is 0
    if standard_deviation == 0:
        return(0)

    # component 1
    comp1 = 1 / (math.sqrt(2 * pow(standard_deviation, 2) * math.pi))

    # component 2
    comp2 = pow(math.e, (-1 * (pow(x - mean, 2)) / (2 * pow(standard_deviation, 2))))

    # return the product of the two components
    return(comp1 * comp2)