@@ -479,14 +479,22 @@ cdef class arb(flint_scalar):
479479 if ttype == FMPZ_UNKNOWN:
480480 return NotImplemented
481481 res = 0
482- if op == 2 : res = arb_eq(sval, tval)
483- elif op == 3 : res = arb_ne(sval, tval)
484- elif op == 0 : res = arb_lt(sval, tval)
485- elif op == 1 : res = arb_le(sval, tval)
486- elif op == 4 : res = arb_gt(sval, tval)
487- elif op == 5 : res = arb_ge(sval, tval)
488- if stype == FMPZ_TMP: arb_clear(sval)
489- if ttype == FMPZ_TMP: arb_clear(tval)
482+ if op == 2 :
483+ res = arb_eq(sval, tval)
484+ elif op == 3 :
485+ res = arb_ne(sval, tval)
486+ elif op == 0 :
487+ res = arb_lt(sval, tval)
488+ elif op == 1 :
489+ res = arb_le(sval, tval)
490+ elif op == 4 :
491+ res = arb_gt(sval, tval)
492+ elif op == 5 :
493+ res = arb_ge(sval, tval)
494+ if stype == FMPZ_TMP:
495+ arb_clear(sval)
496+ if ttype == FMPZ_TMP:
497+ arb_clear(tval)
490498 return res
491499
492500 def __contains__ (self , other ):
@@ -563,7 +571,8 @@ cdef class arb(flint_scalar):
563571 return NotImplemented
564572 u = arb.__new__ (arb)
565573 arb_add((< arb> u).val, (< arb> s).val, tval, getprec())
566- if ttype == FMPZ_TMP: arb_clear(tval)
574+ if ttype == FMPZ_TMP:
575+ arb_clear(tval)
567576 return u
568577
569578 def __radd__ (s , t ):
@@ -574,7 +583,8 @@ cdef class arb(flint_scalar):
574583 return NotImplemented
575584 u = arb.__new__ (arb)
576585 arb_add((< arb> u).val, tval, s.val, getprec())
577- if ttype == FMPZ_TMP: arb_clear(tval)
586+ if ttype == FMPZ_TMP:
587+ arb_clear(tval)
578588 return u
579589
580590 def __sub__ (s , t ):
@@ -585,7 +595,8 @@ cdef class arb(flint_scalar):
585595 return NotImplemented
586596 u = arb.__new__ (arb)
587597 arb_sub((< arb> u).val, (< arb> s).val, tval, getprec())
588- if ttype == FMPZ_TMP: arb_clear(tval)
598+ if ttype == FMPZ_TMP:
599+ arb_clear(tval)
589600 return u
590601
591602 def __rsub__ (s , t ):
@@ -596,7 +607,8 @@ cdef class arb(flint_scalar):
596607 return NotImplemented
597608 u = arb.__new__ (arb)
598609 arb_sub((< arb> u).val, tval, s.val, getprec())
599- if ttype == FMPZ_TMP: arb_clear(tval)
610+ if ttype == FMPZ_TMP:
611+ arb_clear(tval)
600612 return u
601613
602614 def __mul__ (s , t ):
@@ -607,7 +619,8 @@ cdef class arb(flint_scalar):
607619 return NotImplemented
608620 u = arb.__new__ (arb)
609621 arb_mul((< arb> u).val, (< arb> s).val, tval, getprec())
610- if ttype == FMPZ_TMP: arb_clear(tval)
622+ if ttype == FMPZ_TMP:
623+ arb_clear(tval)
611624 return u
612625
613626 def __rmul__ (s , t ):
@@ -618,7 +631,8 @@ cdef class arb(flint_scalar):
618631 return NotImplemented
619632 u = arb.__new__ (arb)
620633 arb_mul((< arb> u).val, tval, s.val, getprec())
621- if ttype == FMPZ_TMP: arb_clear(tval)
634+ if ttype == FMPZ_TMP:
635+ arb_clear(tval)
622636 return u
623637
624638 def __truediv__ (s , t ):
@@ -629,7 +643,8 @@ cdef class arb(flint_scalar):
629643 return NotImplemented
630644 u = arb.__new__ (arb)
631645 arb_div((< arb> u).val, (< arb> s).val, tval, getprec())
632- if ttype == FMPZ_TMP: arb_clear(tval)
646+ if ttype == FMPZ_TMP:
647+ arb_clear(tval)
633648 return u
634649
635650 def __rtruediv__ (s , t ):
@@ -640,7 +655,8 @@ cdef class arb(flint_scalar):
640655 return NotImplemented
641656 u = arb.__new__ (arb)
642657 arb_div((< arb> u).val, tval, s.val, getprec())
643- if ttype == FMPZ_TMP: arb_clear(tval)
658+ if ttype == FMPZ_TMP:
659+ arb_clear(tval)
644660 return u
645661
646662 def __pow__ (s , t , modulus ):
@@ -653,7 +669,8 @@ cdef class arb(flint_scalar):
653669 return NotImplemented
654670 u = arb.__new__ (arb)
655671 arb_pow((< arb> u).val, (< arb> s).val, tval, getprec())
656- if ttype == FMPZ_TMP: arb_clear(tval)
672+ if ttype == FMPZ_TMP:
673+ arb_clear(tval)
657674 return u
658675
659676 def __rpow__ (s , t , modulus ):
@@ -666,7 +683,8 @@ cdef class arb(flint_scalar):
666683 return NotImplemented
667684 u = arb.__new__ (arb)
668685 arb_pow((< arb> u).val, tval, s.val, getprec())
669- if ttype == FMPZ_TMP: arb_clear(tval)
686+ if ttype == FMPZ_TMP:
687+ arb_clear(tval)
670688 return u
671689
672690 def floor (s ):
@@ -2252,11 +2270,16 @@ cdef class arb(flint_scalar):
22522270 c = any_as_arb(c)
22532271 u = arb.__new__ (arb)
22542272 flags = 0
2255- if regularized: flags |= 1
2256- if ab: flags |= 2
2257- if ac: flags |= 4
2258- if bc: flags |= 8
2259- if abc: flags |= 16
2273+ if regularized:
2274+ flags |= 1
2275+ if ab:
2276+ flags |= 2
2277+ if ac:
2278+ flags |= 4
2279+ if bc:
2280+ flags |= 8
2281+ if abc:
2282+ flags |= 16
22602283 arb_hypgeom_2f1((< arb> u).val, (< arb> a).val, (< arb> b).val, (< arb> c).val,
22612284 (< arb> self ).val, flags, getprec())
22622285 return u
0 commit comments