Skip to content

Commit

Permalink
Rename local_bound -> ql_local_bound; do not use in g2_sextic_chi5
Browse files Browse the repository at this point in the history
  • Loading branch information
j-kieffer committed Feb 10, 2025
1 parent a01b1f7 commit a682f44
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/acb_theta.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ int acb_theta_ql_setup(acb_ptr rts, acb_ptr rts_all, acb_ptr t, slong * guard, s
void acb_theta_ql_exact(acb_ptr th, acb_srcptr zs, slong nb, const acb_mat_t tau,
const slong * pattern, int all, int shifted_prec, slong prec);

void acb_theta_local_bound(arb_t c, arb_t rho, acb_srcptr z, const acb_mat_t tau, slong ord);
void acb_theta_ql_local_bound(arb_t c, arb_t rho, acb_srcptr z, const acb_mat_t tau, slong ord);
void acb_theta_ql_jet_error(arb_ptr err, acb_srcptr z, const acb_mat_t tau,
acb_srcptr dth, slong ord, slong prec);

Expand Down
27 changes: 3 additions & 24 deletions src/acb_theta/g2_sextic_chi5.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,32 +62,11 @@ acb_theta_g2_sextic_chi5(acb_poly_t res, acb_t chi5, const acb_mat_t tau, slong
}
else
{
/* Use local_bound to avoid returning NaN */
arb_t c, rho;
arb_init(c);
arb_init(rho);

acb_theta_local_bound(c, rho, zero, tau, 0);
for (k = 0; k < nb * n2; k++)
acb_indeterminate(chi5);
for (k = 0; k < 6; k++)
{
arb_zero_pm_one(acb_realref(&dth[k]));
arb_zero_pm_one(acb_imagref(&dth[k]));
acb_mul_arb(&dth[k], &dth[k], c, prec);
if (k % nb != 0) /* order 1 */
{
acb_div_arb(&dth[k], &dth[k], rho, prec);
}
acb_poly_set_coeff_acb(res, k, chi5);
}

for (k = 0; k < n2; k++)
{
acb_set(&th[k], &dth[k * nb]);
}
acb_theta_g2_chi3_6(res, dth, prec);
acb_theta_g2_chi5(chi5, th, prec);

arb_clear(c);
arb_clear(rho);
}

fmpz_mat_clear(mat);
Expand Down
2 changes: 1 addition & 1 deletion src/acb_theta/ql_jet_fd.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ acb_theta_ql_jet_exact(acb_ptr th, acb_srcptr zs, slong nb, const acb_mat_t tau,
hprec = prec;
for (j = 0; (j < nb) && res; j++)
{
acb_theta_local_bound(&c[j], &rho[j], zs + j * g, tau, ord);
acb_theta_ql_local_bound(&c[j], &rho[j], zs + j * g, tau, ord);
acb_theta_jet_finite_diff_radius(arb_midref(&eps[j]), arb_midref(&err[j]),
&c[j], &rho[j], ord, g, prec);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ acb_theta_local_bound_ci(arb_t c0, arb_t c1, arb_t c2, acb_srcptr z, const acb_m
order ord */

void
acb_theta_local_bound(arb_t c, arb_t rho, acb_srcptr z, const acb_mat_t tau, slong ord)
acb_theta_ql_local_bound(arb_t c, arb_t rho, acb_srcptr z, const acb_mat_t tau, slong ord)
{
slong lp = ACB_THETA_LOW_PREC;
slong b = ord + 1;
Expand Down
5 changes: 3 additions & 2 deletions src/acb_theta/test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
#include "t-jet_mul.c"
#include "t-jet_notransform.c"
#include "t-jet_tuples.c"
#include "t-local_bound.c"
#include "t-ql_exact.c"
#include "t-ql_jet_error.c"
#include "t-ql_jet_fd.c"
#include "t-ql_local_bound.c"
#include "t-ql_lower_dim.c"
#include "t-ql_setup.c"
#include "t-siegel_cocycle.c"
Expand Down Expand Up @@ -111,10 +111,11 @@ test_struct tests[] =
TEST_FUNCTION(acb_theta_jet_mul),
TEST_FUNCTION(acb_theta_jet_notransform),
TEST_FUNCTION(acb_theta_jet_tuples),
TEST_FUNCTION(acb_theta_local_bound),
TEST_FUNCTION(acb_theta_ql_local_bound),
TEST_FUNCTION(acb_theta_ql_exact),
TEST_FUNCTION(acb_theta_ql_jet_error),
TEST_FUNCTION(acb_theta_ql_jet_fd),
TEST_FUNCTION(acb_theta_ql_local_bound),
TEST_FUNCTION(acb_theta_ql_lower_dim),
TEST_FUNCTION(acb_theta_ql_setup),
TEST_FUNCTION(acb_theta_siegel_cocycle),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "acb_mat.h"
#include "acb_theta.h"

TEST_FUNCTION_START(acb_theta_local_bound, state)
TEST_FUNCTION_START(acb_theta_ql_local_bound, state)
{
slong iter;

Expand Down Expand Up @@ -54,7 +54,7 @@ TEST_FUNCTION_START(acb_theta_local_bound, state)
acb_urandom(&z[k], state, prec);
}

acb_theta_local_bound(c, rho, z, tau, ord);
acb_theta_ql_local_bound(c, rho, z, tau, ord);

if (!arb_is_finite(rho) || !arb_is_finite(c))
{
Expand Down

0 comments on commit a682f44

Please sign in to comment.