Repository navigation
PolyLog(s, 1) is Zeta(s) only for Re s > 1, a complex infinity for Re s <= 1 - #681
Closed
enumeratio wants to merge 1 commit into
Closed
enumeratio wants to merge 1 commit into
enumeratio wants to merge 1 commit into
Conversation
… Re s <= 1, on evaluate, N() and the compiled JS and GLSL code; a symbolic order stays unevaluated (cortex-js#680)
enumeratio
force-pushed
the
polylog-at-one-diverges
branch
from
December 3, 2026 00:27
b511ce7 to
8533c5f
Compare
arnog
added a commit
that referenced
this pull request
Dec 3, 2026
… a flattened (a - Mod(a, c))/c, Floor of an integer and (-1)^j; PolyLog(s, 1) is Zeta(s) only for Re s > 1 - #677 (#676): in the bigint compile mode, Floor(a/b) of two integers is the floor division; (a - Mod(a, c))/c is recognized when the canonical form flattens a sum a around the Mod term; Floor, Ceil, Round and Truncate of an integer are the integer; (-1)^j of an integer j is 1 - 2 Mod(j, 2). Power(2, n) still declines. - #681 (#680): PolyLog(s, 1) is Zeta(s) for Re s > 1 and a complex infinity for Re s < 1, in the interpreter, the numeric kernel and the GLSL helpers. A symbolic order not known to exceed 1 stays unevaluated. Review fixes: on Re s = 1, s != 1, PolyLog(s, 1) is bounded with no limit, so it stays unevaluated (NaN in compiled code) instead of a complex infinity; a real order is compared with 1 exactly, not as a double; a complex order with Re s < 1 gives the unsigned pole in compiled JavaScript; the GLSL LerchPhi helper tests z = 1 before its route through PolyLog, so LerchPhi(1, s, 1) keeps the value Zeta(s); flooredQuotient lowers the dividend of the Mod, a node of the program; the unreachable z = 1 branches of polylogIntegerOrderComplex are removed. Co-authored-by: enumeratio <314378874+enumeratio@users.noreply.github.com>
Member
|
Landed in adae37a, with one change: on Re s = 1, s != 1, PolyLog(s, 1) stays unevaluated, because the function is bounded there and has no limit. Thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Liₛ(z) ~ Γ(1 − s)(−ln z)ˢ⁻¹asz → 1, soLiₛ(1) = ζ(s)only where the series converges,Re s > 1; below it the value diverges (onRe s = 1there is no limit).PolyLogansweredZeta(s)for every order.polylogReduce(library/special-functions.ts): atz = 1, a number order givesZeta(s)forRe s > 1andComplexInfinityotherwise (PolyLog(1, 1)stays+∞). A symbolic order givesZeta(s)only whens > 1is proved, else stays unevaluated.numerics/polylog.ts):polylogOrderComplexandpolylogOrderRealreturnInfinityatz = 1forRe s <= 1, as they do for the orders 1, 0 and −1;polylogIntegerOrderComplexno longer givesζ(n)for n ≤ −2._gpu_ir_poly_logand_gpu_ir_cpolyloggive+infatz = 1forRe s <= 1; the f32 model in the test helpers matches.Before and after:
PolyLog(-1/2, 1)was-0.2079,PolyLog(0.5, 1)-1.4604,PolyLog(-4.038, 1)-0.000299,PolyLog(0.5+2i, 1)0.4405-0.3116i,PolyLog(1+2i, 1)Zeta(1+2i); all are nowComplexInfinity.PolyLog(1.5, 1),PolyLog(2, 1)(π²/6) andPolyLog(3+i, 1)are unchanged.Tests (
test/compute-engine/polylog-at-one.test.ts): the values above, theRe s > 1controls, the integer poles unchanged, a symbolic order (unevaluated;Zeta(t)undert > 1), andevaluate(),.N()and compiled JS agreeing for real orders atz = 1.Fixes #680