mirror of
https://github.com/vale981/arb
synced 2025-03-04 17:01:40 -05:00
update acb_dirichlet to use same dft convention
This commit is contained in:
parent
6eb9c87335
commit
c2a7f874dc
6 changed files with 33 additions and 18 deletions
|
@ -16,13 +16,22 @@
|
|||
void
|
||||
acb_dirichlet_dft_index(acb_ptr w, acb_srcptr v, const dirichlet_group_t G, slong prec)
|
||||
{
|
||||
slong k, l, * cyc;
|
||||
cyc = flint_malloc(G->num * sizeof(slong));
|
||||
for (k = 0, l = G->num - 1; l >= 0; k++, l--)
|
||||
cyc[k] = G->P[k].phi.n;
|
||||
if (G->phi_q == 1)
|
||||
{
|
||||
acb_set(w, v);
|
||||
}
|
||||
else
|
||||
{
|
||||
slong k, l, * cyc;
|
||||
|
||||
acb_dft_prod(w, v, cyc, G->num, prec);
|
||||
flint_free(cyc);
|
||||
|
||||
cyc = flint_malloc(G->num * sizeof(slong));
|
||||
for (k = 0, l = G->num - 1; l >= 0; k++, l--)
|
||||
cyc[k] = G->P[k].phi.n;
|
||||
|
||||
acb_dft_prod(w, v, cyc, G->num, prec);
|
||||
flint_free(cyc);
|
||||
}
|
||||
}
|
||||
|
||||
/* dft, number indexing, array size G->q */
|
||||
|
|
|
@ -54,12 +54,19 @@ acb_dirichlet_l_vec_hurwitz(acb_ptr res, const acb_t s,
|
|||
}
|
||||
|
||||
acb_mul(z, z, qs, prec);
|
||||
acb_conj(z, z);
|
||||
|
||||
z++;
|
||||
} while (dirichlet_char_next(cn, G) >= 0);
|
||||
|
||||
acb_dirichlet_dft_index(res, zeta, G, prec);
|
||||
|
||||
{
|
||||
slong k;
|
||||
for (k = 0; k < G->phi_q; k++)
|
||||
acb_conj(res + k, res + k);
|
||||
}
|
||||
|
||||
/* restore pole for the principal character */
|
||||
if (deflate)
|
||||
acb_indeterminate(res);
|
||||
|
|
|
@ -86,7 +86,6 @@ int main()
|
|||
dirichlet_char_init(x, G);
|
||||
dirichlet_char_init(y, G);
|
||||
|
||||
dirichlet_char_one(x, G);
|
||||
for (i = 0; i < len; i++)
|
||||
acb_randtest_precise(v + i, state, prec, 0);
|
||||
|
||||
|
@ -99,6 +98,7 @@ int main()
|
|||
for (j = 0; j < len; j++)
|
||||
{
|
||||
acb_dirichlet_root(chiy, roots, dirichlet_pairing_char(G, x, y), prec);
|
||||
acb_conj(chiy, chiy);
|
||||
acb_addmul(w1 + i, chiy, v + j, prec);
|
||||
dirichlet_char_next(y, G);
|
||||
}
|
||||
|
|
|
@ -77,6 +77,7 @@ int main()
|
|||
flint_printf("\n\n");
|
||||
acb_vec_printd(v, G->phi_q, 10);
|
||||
flint_printf("\n\n");
|
||||
abort();
|
||||
}
|
||||
else if (acb_rel_accuracy_bits(z) < prec - 8
|
||||
|| acb_rel_accuracy_bits(v + i) < prec - 8)
|
||||
|
|
|
@ -45,7 +45,7 @@ int main()
|
|||
dirichlet_char_init(chi, G);
|
||||
|
||||
z = _acb_vec_init(G->expo);
|
||||
_acb_vec_unit_roots(z, G->expo, prec);
|
||||
_acb_vec_unit_roots(z, G->expo, G->expo, prec);
|
||||
|
||||
nv = acb_dirichlet_theta_length_d(q, 1, prec);
|
||||
v = flint_malloc(nv * sizeof(ulong));
|
||||
|
|
|
@ -364,24 +364,22 @@ Dirichlet character Gauss, Jacobi and theta sums
|
|||
Discrete Fourier transforms (DFT)
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Let *G* be a finite abelian group, and `\chi` a character of *G*.
|
||||
For any map `f:G\to\mathbb C`, the discrete fourier transform
|
||||
`\hat f:\hat G\to \mathbb C` is defined by
|
||||
If `f` is a function `\mathbb Z/q\mathbb Z\to \mathbb C`,
|
||||
its discrete Fourier transform is the function
|
||||
defined on Dirichlet characters mod `q` by
|
||||
|
||||
.. math::
|
||||
|
||||
\hat f(\chi) = \sum_{x\in G}\chi(x)f(x)
|
||||
\hat f(\chi) = \sum_{x\mod q}\overline{\chi(x)}f(x)
|
||||
|
||||
Fast Fourier transform techniques allow to compute efficiently
|
||||
all values `\hat f(\chi)`.
|
||||
See the :ref:`acb_dft` module.
|
||||
|
||||
For a Dirichlet group `G` modulo `q`, we take advantage
|
||||
of the Conrey isomorphism `G \to \hat G` to consider the
|
||||
the Fourier transform on Conrey labels as
|
||||
Here we take advantage of the Conrey isomorphism `G \to \hat G`
|
||||
to consider the Fourier transform on Conrey labels as
|
||||
|
||||
.. math::
|
||||
|
||||
g(a) = \sum_{b\bmod q}\chi_q(a,b)f(b)
|
||||
g(a) = \sum_{b\bmod q}\overline{\chi_q(a,b)}f(b)
|
||||
|
||||
|
||||
.. function:: void acb_dirichlet_dft_conrey(acb_ptr w, acb_srcptr v, const dirichlet_group_t G, slong prec)
|
||||
|
|
Loading…
Add table
Reference in a new issue