def METHOD_NAME(alow,ahigh,Trange,T):
    S = 0.0
    if T>0.0:
        Tmid = Trange[1]
        Ta=[]
        Ta.append(np.log(T))   #0
        Ta.append(T)           #1
        Ta.append(T*T/2.0)     #2
        Ta.append(T*T*T/3.0)   #3
        Ta.append(T*T*T*T/4.0) #4
        if T<=Tmid:
            a = alow
        else:
            a = ahigh
        for i in range(len(Ta)):
            S = S + a[i]*Ta[i]
        S = (S + a[6])*p.R
    return S