FLINT3.7.0-dev

_gr_mat_companion_fraction, gr_mat_companion_fraction

Synopsis#include <flint/gr_mat.h>
int _gr_mat_companion_fraction(gr_mat_t res_num, gr_ptr res_den, gr_srcptr poly, gr_ctx_t ctx)source
int gr_mat_companion_fraction(gr_mat_t res_num, gr_ptr res_den, const gr_poly_t poly, gr_ctx_t ctx)source

Set res_num and the scalar res_den such that \mathit{res\_num} / \mathit{res\_den} is the companion matrix of a polynomial of degree n, without dividing: res_den is the leading coefficient. The underscore version reads n + 1 coefficients.

Cite this page

The FLINT team, “_gr_mat_companion_fraction, gr_mat_companion_fraction (gr_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_mat/_gr_mat_companion_fraction.html (generated 2026-10-20).