Skip to content

Commit 8971bee

Browse files
a couple of small improvements
1 parent 1abaf57 commit 8971bee

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

acb_dirichlet/lerch_phi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ acb_dirichlet_lerch_phi(acb_t res, const acb_t z, const acb_t s, const acb_t a,
136136
mag_init(lim);
137137

138138
acb_get_mag(zm, z);
139-
mag_set_d(lim, 0.75);
139+
mag_set_d(lim, 0.875);
140140

141141
if (mag_cmp(zm, lim) <= 0)
142142
{

acb_dirichlet/lerch_phi_integral.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,9 @@ _acb_dirichlet_lerch_phi_integral(acb_t res, const acb_t z, const acb_t s, const
202202
acb_sub(log_z, log_z, t, prec);
203203
}
204204

205+
arb_one(acb_realref(t));
205206
is_real = acb_is_real(z) && acb_is_real(s) && acb_is_real(a) &&
206-
arb_is_positive(acb_realref(a)) && arb_is_negative(acb_realref(log_z));
207+
arb_is_positive(acb_realref(a)) && arb_lt(acb_realref(z), acb_realref(t));
207208

208209
acb_set(param + 0, z);
209210
acb_set(param + 1, s);
@@ -288,6 +289,9 @@ _acb_dirichlet_lerch_phi_integral(acb_t res, const acb_t z, const acb_t s, const
288289

289290
acb_add_error_mag(t, tail_bound);
290291

292+
if (is_real && acb_is_finite(t))
293+
arb_zero(acb_imagref(t));
294+
291295
acb_rgamma(u, s, prec);
292296
acb_mul(res, t, u, prec);
293297
}

0 commit comments

Comments
 (0)