(a, b)
return p1*q2+p2, q1*q2
Sum series for exp(1)-1 between a, b, returning the result
    as an exact fraction (p, q).
Sum series for exp(1)-1 between a, b, returning the result
    as an exact fraction (p, q).
Sum series for exp ( 1 ) - 1 between a b returning the result as an exact fraction ( p q ) .
def bspe(a, b):
    """
    Sum series for exp(1)-1 between a, b, returning the result
    as an exact fraction (p, q).
    """
    if b-a == 1:
        return MPZ_ONE, MPZ(b)
    m = (a+b)//2
    p1, q1 = bspe(a, m)
    p2, q2 = bspe(m, b)
    return p1*q2+p2, q1*q2
def bspe ( a , b ) : if b - a == 1 : return MPZ_ONE , MPZ ( b ) m = ( a + b ) // 2 p1 , q1 = bspe ( a , m ) p2 , q2 = bspe ( m , b ) return p1 * q2 + p2 , q1 * q2