mirror of
https://github.com/vale981/arb
synced 2025-03-05 09:21:38 -05:00
hardy_z: use reflection formula for zeta in upper half plane
This commit is contained in:
parent
5b0b786f9c
commit
253aeba284
2 changed files with 13 additions and 1 deletions
|
@ -24,6 +24,16 @@ acb_dirichlet_hardy_z(acb_ptr res, const acb_t t,
|
|||
if (len <= 0)
|
||||
return;
|
||||
|
||||
/* use reflection formula -- todo for other characters */
|
||||
if ((G == NULL || G->q == 1) && arf_sgn(arb_midref(acb_imagref(t))) > 0)
|
||||
{
|
||||
acb_neg(res, t);
|
||||
acb_dirichlet_hardy_z(res, res, G, chi, len, prec);
|
||||
for (k = 1; k < len; k += 2)
|
||||
acb_neg(res + k, res + k);
|
||||
return;
|
||||
}
|
||||
|
||||
v = _acb_vec_init(len);
|
||||
w = _acb_vec_init(len);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ int main()
|
|||
|
||||
flint_randinit(state);
|
||||
|
||||
for (iter = 0; iter < 100 * arb_test_multiplier(); iter++)
|
||||
for (iter = 0; iter < 200 * arb_test_multiplier(); iter++)
|
||||
{
|
||||
slong m, n1, n2, bits1, bits2, bits3;
|
||||
acb_poly_t S, A, B, C;
|
||||
|
@ -56,6 +56,8 @@ int main()
|
|||
|
||||
acb_dirichlet_hardy_z_series(A, S, G, chi, n1, bits2);
|
||||
acb_poly_set(B, S); /* aliasing */
|
||||
if (q == 1 && n_randint(state, 2))
|
||||
acb_poly_neg(B, B);
|
||||
acb_dirichlet_hardy_z_series(B, B, G, chi, n2, bits3);
|
||||
|
||||
acb_poly_set(C, A);
|
||||
|
|
Loading…
Add table
Reference in a new issue