From 760f665cc5ab28a48ef002c488d3002ebbb42145 Mon Sep 17 00:00:00 2001 From: Alexander Voigt Date: Wed, 4 Oct 2023 19:27:16 +0200 Subject: [PATCH] simplify expression --- src/Li2.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Li2.jl b/src/Li2.jl index 050d8de..ce49c25 100644 --- a/src/Li2.jl +++ b/src/Li2.jl @@ -55,7 +55,8 @@ function reli2_approx(x::BigFloat)::BigFloat for n in 2:typemax(Int64) old_sum = sum - sum += p*(-1)^(n+1)*2*fac(big(2*n))*zeta(2*n, typeof(x))/(2*big(pi))^(2*n)/fac(2*n + 1) + sgn = iseven(n) ? -1 : 1 + sum += p*sgn*2*zeta(2*n, typeof(x))/((2*big(pi))^(2*n)*(2*n + 1)) sum == old_sum && break p *= u2 end