Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ Contributors (0.9.0):
- Rémy Oudompheng (RO)
- Agriya Khetarpal (AK)
- Oscar Benjamin (OB)
- Daniel Simmons-Marengo (DSM)

Changes (0.9.0):

Expand All @@ -181,6 +182,9 @@ Changes (0.9.0):
- [gh-312](https://github.com/flintlib/python-flint/pull/312),
Add `discriminant` method to `fmpz_poly`, `fmpq_poly` and
`nmod_poly`. (RO)
- [gh-336](https://github.com/flintlib/python-flint/pull/336),
Fixed a bug in `arb.neg()` which caused it to return its input
without negating it. (DSM)

0.8.0
-----
Expand Down
2 changes: 2 additions & 0 deletions src/flint/test/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -1669,6 +1669,8 @@ def test_arb():
assert arb(3) <= arb("inf")
assert arb(3) == arb(3)
assert arb(3) != arb(2)
assert -arb(3) == arb(-3)
assert arb(3).neg() == arb(-3)
assert not (arb("1.1") == arb("1.1"))

assert arb(3).repr() == 'arb((0x3, 0x0))'
Expand Down
4 changes: 2 additions & 2 deletions src/flint/types/arb.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -567,9 +567,9 @@ cdef class arb(flint_scalar):
def neg(self, bint exact=False):
res = arb.__new__(arb)
if exact:
arb_set((<arb>res).val, (<arb>self).val)
arb_neg((<arb>res).val, (<arb>self).val)
else:
arb_set_round((<arb>res).val, (<arb>self).val, getprec())
arb_neg_round((<arb>res).val, (<arb>self).val, getprec())
return res

def __abs__(self):
Expand Down
Loading