File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ Contributors (0.9.0):
167167- Rémy Oudompheng (RO)
168168- Agriya Khetarpal (AK)
169169- Oscar Benjamin (OB)
170+ - Daniel Simmons-Marengo (DSM)
170171
171172Changes (0.9.0):
172173
@@ -181,6 +182,9 @@ Changes (0.9.0):
181182- [ gh-312 ] ( https://github.com/flintlib/python-flint/pull/312 ) ,
182183 Add ` discriminant ` method to ` fmpz_poly ` , ` fmpq_poly ` and
183184 ` nmod_poly ` . (RO)
185+ - [ gh-336 ] ( https://github.com/flintlib/python-flint/pull/336 ) ,
186+ Fixed a bug in ` arb.neg() ` which caused it to return its input
187+ without negating it. (DSM)
184188
1851890.8.0
186190-----
Original file line number Diff line number Diff line change @@ -1673,6 +1673,8 @@ def test_arb():
16731673 assert arb (3 ) <= arb ("inf" )
16741674 assert arb (3 ) == arb (3 )
16751675 assert arb (3 ) != arb (2 )
1676+ assert - arb (3 ) == arb (- 3 )
1677+ assert arb (3 ).neg () == arb (- 3 )
16761678 assert not (arb ("1.1" ) == arb ("1.1" ))
16771679
16781680 assert arb (3 ).repr () == 'arb((0x3, 0x0))'
Original file line number Diff line number Diff line change @@ -567,9 +567,9 @@ cdef class arb(flint_scalar):
567567 def neg (self , bint exact = False ):
568568 res = arb.__new__ (arb)
569569 if exact:
570- arb_set ((< arb> res).val, (< arb> self ).val)
570+ arb_neg ((< arb> res).val, (< arb> self ).val)
571571 else :
572- arb_set_round ((< arb> res).val, (< arb> self ).val, getprec())
572+ arb_neg_round ((< arb> res).val, (< arb> self ).val, getprec())
573573 return res
574574
575575 def __abs__ (self ):
You can’t perform that action at this time.
0 commit comments