def pow_mid(p, max_denom=1024):
 assert (0 < p < 1)
 p = Fraction(p).limit_denominator(max_denom)
 return (p, (p, (1 - p)))

def pow_mid ( p , max_denom = 1024 ) : assert ( 0 < p < 1 ) p = Fraction ( p ) . limit_denominator ( max_denom ) return ( p , ( p , ( 1 - p ) ) )
return power tuple t <= x^p 1^ user wants the epigraph variable t .