From 07d270245a19d1f7716ad060a2dec36f3e044a95 Mon Sep 17 00:00:00 2001 From: Gilles Villard Date: Fri, 19 Dec 2025 12:29:30 +0100 Subject: [PATCH] identity instead of x^k identity in mbasis --- .../src/nmod_mat_poly_extra/nmod_mat_poly_mbasis.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flint-extras/src/nmod_mat_poly_extra/nmod_mat_poly_mbasis.c b/flint-extras/src/nmod_mat_poly_extra/nmod_mat_poly_mbasis.c index fd9e5fde..bef99d21 100644 --- a/flint-extras/src/nmod_mat_poly_extra/nmod_mat_poly_mbasis.c +++ b/flint-extras/src/nmod_mat_poly_extra/nmod_mat_poly_mbasis.c @@ -125,12 +125,12 @@ _PROFILER_REGION_START const slong n = matp->c; // initialize output approximant basis with identity - // except when matp == 0: return appbas = x**order * identity + // except when matp == 0: return appbas = identity if (nmod_mat_poly_is_zero(matp)) { - nmod_mat_poly_fit_length(appbas, order+1); - _nmod_mat_poly_set_length(appbas, order+1); - nmod_mat_one(appbas->coeffs + order); + nmod_mat_poly_fit_length(appbas, 1); + _nmod_mat_poly_set_length(appbas, 1); + nmod_mat_one(appbas->coeffs + 0); _PROFILER_REGION_STOP(t_others) _MBASIS_PROFILER_OUTPUT return;