import math


def sigmoid_function(z):
    """
    Evaluate sigmoid function at point z
    """

    if(z >= 500):
        return 0.9999
    elif(z <= -500):
        return 0.0001
    else:
        value = 1.0 / (1 + math.exp(-1 * z))

    return value