Repository navigation
Argument of a complex value carries the requested digits under N() - #440
Closed
enumeratio wants to merge 1 commit into
Closed
enumeratio wants to merge 1 commit into
enumeratio wants to merge 1 commit into
Conversation
…r N(), as Arctan2 does, so N(Argument(e + iπ), 25) carries 25 digits; add regression tests against mpmath. Fix cortex-js#439
enumeratio
added a commit
to enumeratio/enumeratio
that referenced
this pull request
Oct 15, 2026
…Argument; settle the remaining rows (#925) BigDecimal power-series kernels answer N(f, d) for AiryAi/Bi, Ei, li and integer-order Bessel I/J/K/Y once d exceeds a double's digits; a run with 10 more digits must agree, otherwise they decline to the native evaluation. A ce-patch carries Argument of a complex literal through bignum Arctan2 under N (upstream: cortex-js/compute-engine#440). Simplify folds rational expressions in GoldenRatio; fromWolfram reads Range with step 1. The remaining Wolfram triage rows are settled toward Wolfram or classified, none dropped; our-side bugs go to #911.
arnog
added a commit
that referenced
this pull request
Oct 15, 2026
… precision, integration gaps PR #436 (enumeratio, fix #434): the JavaScript target lowers HurwitzZeta, LerchPhi, PolyLog, EllipticK, the complete EllipticE, Hypergeometric2F1 and LambertW to the interpreter's complex kernel in `auto` and `complex` mode where the operand facts do not prove the value real; `strict` keeps the real kernel and its NaN; a complex operand takes the complex kernel in every mode. The verdict lives in one place (`complexContinuation`), read by both `isComplexValued` and the emitters. The GLSL and WGSL targets decline a provably complex value, now including a positive integer order on the cut `z > 1` (`PolyLog(2, 3)`, `LerchPhi(3, 2, 1)`). `Arcsec` and `Arccsc` of an operand of unknown magnitude type `complex | infinity | nan` instead of `number`, so the compiled lanes read the complex value. PR #440 (enumeratio, fix #439): `Argument` of a complex value passes the bignum parts to `Arctan2`, so `N(Argument(e + iπ), 25)` carries 25 digits. Also from #439: `Transpose` of an operand with no known shape is typed `unknown` (a union such as `matrix | vector` is transposed member by member), so `MatrixMultiply(q, Transpose(q))` with a free `q` stays unevaluated instead of an `incompatible-type` error. PR #441 (KingArth0r): definite integrals of more families evaluate in closed form — an absolute value or sign of a non-affine argument is split at its exact roots; integer-cell sums (Floor, Ceil, Fract with an affine weight) and `|sin(kx + m)|` over many periods no longer grow with the cell count; `∫₀¹ {1/x} dx = 1 − γ` and `∫₀¹ ⌊1/x⌋ dx = +∞`; primitives for Erf, Erfc, BesselJ(1, ·), BesselI(1, ·), Digamma, Trigamma and PolyGamma of an affine argument (and `d/dx LogGamma = Digamma`); the nested exponential `∫ e^{x + e^x} dx`; the Bose moments `∫₀^∞ xⁿ/(e^{ax} − 1) dx`. With the Rubi rules loaded, a provider antiderivative with no value at a bound falls back to the built-in one. Loading the rules compiles each distinct pattern once, and an invalid `stepBudget` is rejected before compilation. The PR's profiling script and JSON record are not included. Review fixes on top of the PRs: a user definition with its own `compile` handler keeps its own lane; compiled `HurwitzZeta(1, z)` for a non-real `z` is the pole; the period shortcut declines outside radian mode; exact coefficients in the cell sums stay exact; a polygamma integral between two consecutive poles evaluates; the infinite-bound inert decision reads the heads that contain the variable. ROADMAP: the antiderivative of Sin and Cos ignores the degree angular unit (found by the review; pre-existing). Fix #434 Fix #439 Co-authored-by: enumeratio <314378874+enumeratio@users.noreply.github.com> Co-authored-by: KingArthur <118565558+KingArth0r@users.noreply.github.com>
Member
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.
Fix #439.
N(Argument(e + iπ), 25)was0.8575117863558462702910252, wrong from the 17th digit because the angle was the doubleatan2of the parts. We now pass the bignum parts toArctan2, so it is0.8575117863558462650068678(true0.857511786355846265006867751).Argument(2 + iπ)at 25 digits was1.003884821853887179762058and is1.003884821853887214148424.Argis the same operator.Exact operands,
Argument(∞·i)and the compiled JavaScript lane (doubles) are unchanged.