Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/source/nmod_poly.rst
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ Multiplication
product of ``poly1`` and ``poly2``.

.. function:: void _nmod_poly_mulmid(nn_ptr res, nn_srcptr poly1, slong len1, nn_srcptr poly2, slong len2, slong nlo, slong nhi, nmod_t mod)
void nmod_poly_mulmid(nn_ptr res, nn_srcptr poly1, slong len1, nn_srcptr poly2, slong len2, slong nlo, slong nhi, nmod_t mod)
void nmod_poly_mulmid(nmod_poly_t res, const nmod_poly_t poly1, const nmod_poly_t poly2, slong nlo, slong nhi)
void _nmod_poly_mulmid_classical(nn_ptr res, nn_srcptr poly1, slong len1, nn_srcptr poly2, slong len2, slong nlo, slong nhi, nmod_t mod)
void nmod_poly_mulmid_classical(nn_ptr res, nn_srcptr poly1, slong len1, nn_srcptr poly2, slong len2, slong nlo, slong nhi, nmod_t mod)
void _nmod_poly_mulmid_KS(nn_ptr res, nn_srcptr poly1, slong len1, nn_srcptr poly2, slong len2, slong nlo, slong nhi, nmod_t mod)
Expand Down
16 changes: 8 additions & 8 deletions src/nmod_poly/evaluate_geometric_nmod_vec.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ void _nmod_poly_evaluate_geometric_nmod_vec_fast_precomp(nn_ptr vs, nn_srcptr po
FLINT_ASSERT(G->function & 1);
FLINT_ASSERT(len <= G->len);

if (plen == 0)
{
_nmod_vec_zero(vs, len);
return;
}

/* val = valuation of poly */
slong val;
for (val = 0; val < plen; val++)
slong val = 0;
for ( ; val < plen; val++)
{
if (poly[val] != 0)
{
break;
}
}

if (val == plen) /* covers the case plen == 0 */
{
_nmod_vec_zero(vs, len);
return;
}

/** Formula, based on Bluestein's trick:
* poly(q**j) = sum_{i=0}^{n-1} poly[i] q**{i*j} is the coefficient x**{n+j-1} of the product
* (sum_{i=0}^{len-1} poly[i] * q**(-i*i / 2) x**{len-i-1}) * (sum_{i=0}^{2*len-2} q**{i*i/2} x**i)
Expand Down
Loading