Skip to content

Commit

Permalink
simplify expression
Browse files Browse the repository at this point in the history
  • Loading branch information
Expander committed Oct 4, 2023
1 parent 568b448 commit 760f665
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Li2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 760f665

Please sign in to comment.