def polylog2(x):
if <NUM_LIT:0> <= x <= <NUM_LIT>:<EOL><INDENT>p = [<NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, <NUM_LIT>]<EOL>q = [-<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT:1.0>]<EOL>offset = <NUM_LIT><EOL><DEDENT>elif <NUM_LIT> < x <= <NUM_LIT>:<EOL><INDENT>p = [<NUM_LIT>, -<NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>]<EOL>q = [-<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT:1.0>]<EOL>offset = <NUM_LIT><EOL><DEDENT>elif <NUM_LIT> < x <= <NUM_LIT:1>:<EOL><INDENT>p = [<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>]<EOL>q = [-<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT:1.0>]<EOL>offset = <NUM_LIT><EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>x = x - offset<EOL>return horner(p, x)/horner(q, x)<EOL>
r'''Simple function to calculate PolyLog(2, x) from ranges 0 <= x <= 1,
    with relative error guaranteed to be < 1E-7 from 0 to 0.99999. This
    is a Pade approximation, with three coefficient sets with splits at 0.7 
    and 0.99. An exception is raised if x is under 0 or above 1. 


    Parameters
    ----------
    x : float
        Value to evaluate PolyLog(2, x) T

    Returns
    -------
    y : float
        Evaluated result

    Notes
    -----
    Efficient (2-4 microseconds). No implementation of this function exists in 
    SciPy. Derived with mpmath's pade approximation.
    Required for the entropy integral of 
    :obj:`thermo.heat_capacity.Zabransky_quasi_polynomial`.

    Examples
    --------
    >>> polylog2(0.5)
    0.5822405264516294