def key(c): '''return, for ax**n+b, +/-root(abs(b/a), b) according to the apparent sign of the imaginary interval, e.g. if the interval were (0, 3) the positive root would be returned. ''' u, f, k = c r = _root(abs(f.TC() / f.LC()), f.degree()) if u.ay < 0 or u.by < 0: return -r return r
def key(c): '''return, for ax**n+b, +/-root(abs(b/a), b) according to the apparent sign of the imaginary interval, e.g. if the interval were (0, 3) the positive root would be returned. ''' u, f, k = c r = _root(abs(f.TC()/f.LC()), f.degree()) if u.ay < 0 or u.by < 0: return -r return r