Beispiel #1
0
 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
Beispiel #2
0
 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