def sigmoid_poly(x):
    """A Chebyshev polynomial approximation of the sigmoid function."""

    w0 = 0.5
    w1 = 0.2159198015
    w3 = -0.0082176259
    w5 = 0.0001825597
    w7 = -0.0000018848
    w9 = 0.0000000072

    x1 = x
    x2 = (x1 * x)
    x3 = (x2 * x)
    x5 = (x2 * x3)
    x7 = (x2 * x5)
    x9 = (x2 * x7)

    y1 = w1 * x1
    y3 = w3 * x3
    y5 = w5 * x5
    y7 = w7 * x7
    y9 = w9 * x9

    z = y9 + y7 + y5 + y3 + y1 + w0

    return z