These are chat archives for symengine/symengine
integer_classfrom a flint polynomial, as internally they are stored as
fmpzxx. What can be done? One is to keep the
INTEGER_CLASS==flintit is possible, but otherwise it is not
get_coeffreturns reference of the native type, but we use
to_integer_classeverywhere else (eg. in
as_symbolicetc) It won't affect performance (will be the same), but will have to use
to_integer_class(it->second)instead of just
to_integer_class(const integer_class &a)works right?
flint:fmpzxxbut an expression template. We anyways will have to convert it to
flint:fmpzxx, so there's no point of the reference.
static_cast<fmpz_wrapper &>(fmpz_poly_get_coeff_ptr(p._poly(), n))
static_cast<flint::fmpzxx &>(fmpz_poly_get_coeff_ptr(p._poly(), n))
get_coeff_refshould throw an error if the term is not found