Open fredrik-johansson opened 8 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.
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
oracb_t
(or a pointer to one) insidenf_t
, recyclenf_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