Skip to content

Commit 3178aa5

Browse files
committed
Simplfify fmpz_poly.leading_coefficient
1 parent 0d5ad6c commit 3178aa5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/flint/types/fmpz_poly.pyx

+2-4
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,8 @@ cdef class fmpz_poly(flint_poly):
157157
cdef fmpz x
158158
cdef slong d
159159
d = fmpz_poly_degree(self.val)
160-
if d < 0:
161-
x = fmpz.__new__(fmpz)
162-
else:
163-
x = fmpz.__new__(fmpz)
160+
x = fmpz.__new__(fmpz)
161+
if d >= 0:
164162
fmpz_poly_get_coeff_fmpz(x.val, self.val, d)
165163
return x
166164

0 commit comments

Comments
 (0)