def powint(xlow, xhigh, ylow, yhigh, xval, power):
    """Power-based interpolator 
    :param xlow: x lower interval
    :param xhigh: x upper interval
    :param ylow: y lower interval
    :param yhigh: y upper interval
    :param xval: value on x
    :param power: power for interpolation
    :return: TODO
    """
    EPSLON = 1e-20
    if xhigh - xlow < EPSLON:
        powint = (yhigh + ylow) / 2.0
    else:
        powint = ylow + (yhigh - ylow) * ((xval - xlow) / (xhigh - xlow)
            ) ** power
    return powint
