Skip to content

Commit 290bc7c

Browse files
committed
Add Polynomial_real_arb by copy-paste-replace from Polynomial_complex_arb
1 parent aa8778f commit 290bc7c

File tree

5 files changed

+986
-0
lines changed

5 files changed

+986
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Macros from arb_poly.h
2+
# See https://github.com/flintlib/flint/issues/1529
3+
4+
from .types cimport *
5+
6+
cdef extern from "flint_wrap.h":
7+
arb_ptr arb_poly_get_coeff_ptr(arb_poly_t p, ulong n)

src/sage/rings/polynomial/meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ py.install_sources(
7070
'polynomial_quotient_ring_element.py',
7171
'polynomial_rational_flint.pxd',
7272
'polynomial_rational_flint.pyx',
73+
'polynomial_real_arb.pxd',
74+
'polynomial_real_arb.pyx',
7375
'polynomial_real_mpfr_dense.pyx',
7476
'polynomial_ring.py',
7577
'polynomial_ring_constructor.py',
@@ -116,6 +118,7 @@ extension_data = {
116118
'polynomial_complex_arb' : files('polynomial_complex_arb.pyx'),
117119
'polynomial_element' : files('polynomial_element.pyx'),
118120
'polynomial_number_field' : files('polynomial_number_field.pyx'),
121+
'polynomial_real_arb' : files('polynomial_real_arb.pyx'),
119122
'polynomial_real_mpfr_dense' : files('polynomial_real_mpfr_dense.pyx'),
120123
'polynomial_ring_homomorphism' : files('polynomial_ring_homomorphism.pyx'),
121124
'real_roots' : files('real_roots.pyx'),
@@ -130,6 +133,8 @@ foreach name, pyx : extension_data
130133
deps = [py_dep, cysignals, gmp, numpy]
131134
if name == 'evaluation_flint'
132135
deps += [flint, mpfi]
136+
elif name == 'polynomial_real_arb'
137+
deps += [flint, mpfi]
133138
elif name == 'polynomial_complex_arb'
134139
deps += [flint, mpfi]
135140
elif name == 'polynomial_real_mpfr_dense'
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from sage.libs.flint.arb_poly cimport *
2+
from sage.rings.polynomial.polynomial_element cimport Polynomial
3+
4+
cdef class Polynomial_real_arb(Polynomial):
5+
cdef arb_poly_struct[1] _poly # https://github.com/cython/cython/issues/1984
6+
cdef Polynomial_real_arb _new(self)

0 commit comments

Comments
 (0)