flintlib / flint

FLINT (Fast Library for Number Theory)
http://www.flintlib.org
GNU Lesser General Public License v3.0
444 stars 245 forks source link

Steal code from e-antic #1848

Open fredrik-johansson opened 7 months ago

fredrik-johansson commented 7 months ago

There is real root isolation code for fmpz_poly that in many cases should outperform the complex root-finding code we have now.

For embedded number fields, I'm not sure the best strategy is to really maintain the numerical enclosure for each element? This makes sense if you do a lot of comparisons, less so if you do a lot of arithmetic.

Otherwise, we could just stick an optional arb_t or acb_t (or a pointer to one) inside nf_t, recycle nf_elem_t, and compute the enclosure for an element only when it's needed.

Either way, it would be rather low effort to implement embedded number fields via generics.

@videlec

videlec commented 7 months ago

In our use case it is basically one arithmetic operation for at least one comparison. The typical use case is for polytopes defined over number fields such as implemented in https://github.com/Normaliz/Normaliz.