Repository navigation
Keep the small parts of a logarithm near 1, a root and Ci (#2677) - #2681
Merged
Merged
Conversation
A logarithm took ln(1 + t) for the residual of a cancellation against 1 below half the working digits, so ln(1 + 10^(-60)) was 0, and with it arcoth, arcsch, artanh and arsech past 10^50, which are logarithms of 1 + 1/x. A logarithm whose argument's modulus is within 10^(-25) of 1, or is a 0 or 1 an inexact expression evaluated to, now evaluates its arguments again with the digits it cancels; a residual 1 stays 0. A root of a number with a decimal imaginary part other than 0 is no longer searched for among the reals, which read a phase of 10^(-60) as 0: sqrt(1 + 10^(-60) i) was 1. Ci and Si past the series measured the constant pi/2 branch terms they add and take away as terms of their own size, so Ci(10^60 + i) lost its imaginary part; a constant is a residual only against its last digits. AComplexFunctionKeepsASmallPartTest pinned the real part of ln(1 + 10^(-60) i) as 0; it is 5e-121, and the test now says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Evaluating again every logarithm of a 1 an inexact expression evaluated to cost limitcheck 15% of its time, measured by ablation: 32.0 s with the 1s, 29.2 s with the 0s alone, 27.8 s with neither. A 0 is now evaluated again only where the argument is a sum, where a cancellation can leave it. ln(e^(10^(-60))), whose argument the downcasting rounds onto 1, stays 0, and its test row and table row go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2681 +/- ##
==========================================
- Coverage 86.64% 86.64% -0.01%
==========================================
Files 346 346
Lines 76300 76412 +112
Branches 22380 22425 +45
==========================================
+ Hits 66113 66209 +96
- Misses 5506 5511 +5
- Partials 4681 4692 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…2677) The solver writes a trigonometric root as ln(a + b i) / i, with a and b decimals to the working digits and |a + b i| = 1 to within their rounding, about 10^(-101). Evaluated again with more digits, a written decimal is the same decimal, so that distance read as placed, and the logarithm returned it: the real roots of cos(3x) = sin(2x) and sin(2x) = sin(3x) came back with imaginary parts near 10^(-101), and trigcheck dropped them under scaling. Where either argument has a decimal in it, a distance is known to the working digits alone, and a 0 a sum left is not evaluated again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
symlimitcheck was 16% slower, and the logarithm near 1 was the whole of it: 6178 logarithms, 404 of them evaluated again at 224 and 464 digits, 4.2 s. They were arguments with a modulus exactly 1, -7/10 + sqrt(51)/10 i above all, and arcosh-like ones of 3/5 + 4/5 i, which more digits cannot move off 1. The distance was taken rounded at each step, so the square of sqrt(51)/10 came out 0.51 exactly and the modulus read as 1 below the working digits, not known. The distance is now taken exactly and rounded after, so such a modulus is 1 within its parts' rounding, about 10^(-100), and that band, ten digits either side of the last known one, keeps the working digits. A number with two rational parts has its distance exactly, and 0 is on the circle. Below the band, 0 among it, the digits are doubled as before, which is what arcsch(10^200) and arsech(10^200 i) need. In symlimitcheck the method now takes 43 ms and evaluates nothing again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every logarithm wrote its argument and the base e as doubles to ask whether either was near the unit circle, 2.5 kB each, and the kernel benchmark's EvalTranscendentalFresh allocated 38,360 B/op against a baseline of 34,128. The logarithm is now taken first, and the work near 1 entered only where its real part is 0, -oo or below 10^(-precision/4), which the exponent and the mantissa's bits say for 64 bytes, or where the base is not e. ln(1 + x^2) * arctan(x) at 0.37 allocates 34,544 B/op, against master's 34,480. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
limitcheck was 7% slower with the logarithm asked first, and all of it was the near-1 path: instrumented, 1.6 s, 1.3 s of it four logarithms to the base erf(+-1000) and erf(+-10000), which is 1 below the working digits and was evaluated again at 224 and 464 digits, and the rest bases log(100, 100). A base now counts only where its distance from 1 is placed at the working digits; log(1 + 10^(-60), 2) is one such. MayBeNearOne moves above NearOneWithMoreDigits' doc comment, which it had split from its member (DocCommentPlacementTest). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Dec 2, 2026
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.
Fixes #2677
What was wrong
On master (e3b3a34, after #2676) a part of a value far smaller than the rest was dropped:
arcoth(10^60)andarcsch(10^60)were 0 where they are1E-60,arsech(10^50 * i)lost its real part1E-50,(1 + 10^(-50) * i)^(1/2)was 1 where it is1 + 5E-51i, andCi(10^60 + i)lost its imaginary part-6.548E-61. In the same class:ln(1 + 10^(-60))was 0,arsinh(-10^60 * i)andarcsch(10^(-60) * i)were-oo, and every root of1 + 10^(-k) ihad no imaginary part.Causes, each confirmed before it was fixed
arcoth(x) = 1/2 ln((x + 1)/(x - 1))(Convenience/MathS.cs:2675and its neighbours), so far out each isln(1 + t)for a tinyt.Number.Lnmakes a real logarithm at the scale of its argument (Core/Entity/Continuous/Number/Operators.cs:941on master), andReal.CreateAtScalerounds a value below the tolerance times the scale onto 0 (Entity.Continuous.Real.Definition.cs:147). At a hundred digits the tolerance is1E-50, soln(1 + 2E-60) = 2E-60was 0. The exact argument ofarcothand the inexact one ofarcschfail the same way, and so doesln(1 + 10^(-60))written out.10^(-60)as 0.1 + 10^(-60) * ievaluates with a decimal imaginary part, so Keep every part of a complex value past 10^50 (#2675) #2676's guard for an exact imaginary part does not apply.FindGoodRoot(Operators.cs:772) went on toGetAllRoots, whose phaseLn(value / |value|) / i(Operators.cs:370) came out 0, which I measured as the roots returned and did not trace further, andIsZeroAtTheWorkingPrecision(Pow(rational, power) - base)(Operators.cs:460) accepted1as the root, because1E-60 iis under1E-50.Ci(z) = Chi(iz) - i pi/2,Chiadds+-pi/2, andEi(z)andEi(-z)add+-pieach (TrigonometricIntegrals.cs:194, 212;ExponentialIntegrals.cs:209). They cancel to-6.5E-61 i, and each was added to the imaginary scale at full size, so the scale was about2 piand the value was below the tolerance times it.The fix
Logf's numerical evaluation (Functions/Evaluation/Evaluation.Continuous/Evaluation.Continuous.Arithmetics.Classes.cs:600,NearOneWithMoreDigitsat :673) evaluates the base and the antilogarithm again, with more digits, where the modulus of either is within10^(-precision/4)of 1. It takesprecision + kand2kdigits for a distance10^(-k), so the value is above half of them and keeps all of its own. A rational's distance is exact. A decimal distance below the working digits is not known, so the digits are doubled, twice at most. A 0 that a sum other than exact arithmetic evaluated to is treated the same way:arsinh(-10^60 i)isln(-10^60 i + sqrt(1 - 10^120)), whose argument cancels to-5E-61 i. The wider contexts are cached, since the constants are cached by context instance. A logarithm of a 1 that is a residual, such asln(sqrt(2)^2/2)orln(sin(3)^2 + cos(3)^2), stays a residual at more digits and is still 0. Where either argument has a decimal written in it, such as a root the solver wrote asln(a + b i) / i, evaluating it again does not add digits: its distance from 1 is known to the working digits only, and below them it is the decimal's own rounding. A modulus that is exactly 1 is left alone as well. The distance from 1 is now taken exactly and rounded afterwards, and anything within ten digits either side of the last known digit counts as the parts' own rounding. A number whose two parts are both rational gets its distance exactly. Only a decimal distance further below that band, 0 included, is evaluated again: that is whatarcsch(10^200)andarsech(10^200 i)need. Without this, symlimitcheck spent 4.2 s re-evaluating 404 logarithms of-7/10 + sqrt(51)/10 iand3/5 + 4/5 iat 224 and 464 digits. The first version of this PR missed the written-decimal case. It read|a + b i| - 1 ~ 1e-101as a value, and the real roots ofcos(3x) = sin(2x)andsin(2x) = sin(3x)came back with imaginary parts near1e-101, which trigcheck caught under scaling. This is the brief's "area function evaluated with log1p-style care", made at the logarithm, so it covers every spelling ofln(1 + t)and not only the six area functions. Keeping six new nodes would have meant teaching differentiation, simplification, integration, limits, the solver, the printers and the compilers about each one.FindGoodRootreturns no real root for a base with a decimal imaginary part other than 0 (Operators.cs:429), as Keep every part of a complex value past 10^50 (#2675) #2676 already did for an exact one. A number keeps such a part only when its own creation judged it no residual. The base goes to the polar form, which keeps the phase.GetAllRootsis unchanged: Keep every part of a complex value past 10^50 (#2675) #2676 measured that changing it mixed a complex principal root with a real sibling and gave-1.pi * 10^(-guard)(ExponentialIntegrals.cs:218,TrigonometricIntegrals.cs:198, 219, 224). A constant cancels nothing, which is the same accounting as the series'ScaleByPowerOfTen(beyond).Each fix links the v3 decision (#1019), since each answers a residual of the downcasting.
Sweep
(mpmath, dps 1200): every area function,arcsec,arccscandarccotatx,x iand-x iforxin 10^10, 10^20, 10^60, 10^200 and 10^-60;sqrt,(1 + t)^(1/3),(1 + t)^(2/3),(1 + t)^(-1/2)andln(1 + t)fort = +-10^(-k)and+-10^(-k) i, k in 10, 20, 60 and 200; andCi,SiandEiatx + i,x - i,1 + x iand-1 + x i. That is 275 rows. Each part is held to a relative 1e-10, and a part that is 0 to exactly 0.The 43 rows that changed:
arsinh(-10^60 * i)arsinh(10^(-60))arcosh(10^(-60) * i)arcosh(-10^(-60) * i)artanh(10^60)artanh(10^200)artanh(10^(-60))arcoth(10^60)arcoth(10^200)arcoth(10^(-60))arsech(10^60 * i)arsech(-10^60 * i)arsech(10^200 * i)arsech(-10^200 * i)arcsch(10^60)arcsch(10^200)arcsch(10^(-60) * i)ln(1 + 10^(-60))ln(1 + -10^(-60))sqrt(1 + 10^(-60) * i)(1 + 10^(-60) * i)^(1/3)(1 + 10^(-60) * i)^(2/3)(1 + 10^(-60) * i)^(-1/2)ln(1 + 10^(-60) * i)sqrt(1 + -10^(-60) * i)(1 + -10^(-60) * i)^(1/3)(1 + -10^(-60) * i)^(2/3)(1 + -10^(-60) * i)^(-1/2)ln(1 + -10^(-60) * i)ln(1 + 10^(-200))ln(1 + -10^(-200))sqrt(1 + 10^(-200) * i)(1 + 10^(-200) * i)^(1/3)(1 + 10^(-200) * i)^(2/3)(1 + 10^(-200) * i)^(-1/2)ln(1 + 10^(-200) * i)sqrt(1 + -10^(-200) * i)(1 + -10^(-200) * i)^(1/3)(1 + -10^(-200) * i)^(2/3)(1 + -10^(-200) * i)^(-1/2)ln(1 + -10^(-200) * i)Ci(10^60 + i)Ci(10^60 - i)The 31 rows still wrong, unchanged from master:
Ci,SiandEioverflow past10^100000(e^(10^10)and up). They give+-ooorNaN, as on master.Ei(+-1 + 10^200 * i)returnsi piwith no real part (2.6E-200). This is An exact expression whose parts are below 10^-100 evaluates to wrong digits: sqrt(1/10^200 + 1/10^210) * 10^100 is 0 #2668's deliberate cut: a decimal imaginary part past10^(precision - 16)has no cosine.10^200 * ievaluates to such a decimal, because a Complex holds its parts as decimals.arsinh(-10^200 * i)is still-oo. Its argument cancels terms of10^200down to5E-201, which needs more than the two doublings allow.All 275 rows
arsinh(10^10)arsinh(10^10 * i)arsinh(-10^10 * i)arsinh(10^20)arsinh(10^20 * i)arsinh(-10^20 * i)arsinh(10^60)arsinh(10^60 * i)arsinh(-10^60 * i)arsinh(10^200)arsinh(10^200 * i)arsinh(-10^200 * i)arsinh(10^(-60))arsinh(10^(-60) * i)arsinh(-10^(-60) * i)arcosh(10^10)arcosh(10^10 * i)arcosh(-10^10 * i)arcosh(10^20)arcosh(10^20 * i)arcosh(-10^20 * i)arcosh(10^60)arcosh(10^60 * i)arcosh(-10^60 * i)arcosh(10^200)arcosh(10^200 * i)arcosh(-10^200 * i)arcosh(10^(-60))arcosh(10^(-60) * i)arcosh(-10^(-60) * i)artanh(10^10)artanh(10^10 * i)artanh(-10^10 * i)artanh(10^20)artanh(10^20 * i)artanh(-10^20 * i)artanh(10^60)artanh(10^60 * i)artanh(-10^60 * i)artanh(10^200)artanh(10^200 * i)artanh(-10^200 * i)artanh(10^(-60))artanh(10^(-60) * i)artanh(-10^(-60) * i)arcoth(10^10)arcoth(10^10 * i)arcoth(-10^10 * i)arcoth(10^20)arcoth(10^20 * i)arcoth(-10^20 * i)arcoth(10^60)arcoth(10^60 * i)arcoth(-10^60 * i)arcoth(10^200)arcoth(10^200 * i)arcoth(-10^200 * i)arcoth(10^(-60))arcoth(10^(-60) * i)arcoth(-10^(-60) * i)arsech(10^10)arsech(10^10 * i)arsech(-10^10 * i)arsech(10^20)arsech(10^20 * i)arsech(-10^20 * i)arsech(10^60)arsech(10^60 * i)arsech(-10^60 * i)arsech(10^200)arsech(10^200 * i)arsech(-10^200 * i)arsech(10^(-60))arsech(10^(-60) * i)arsech(-10^(-60) * i)arcsch(10^10)arcsch(10^10 * i)arcsch(-10^10 * i)arcsch(10^20)arcsch(10^20 * i)arcsch(-10^20 * i)arcsch(10^60)arcsch(10^60 * i)arcsch(-10^60 * i)arcsch(10^200)arcsch(10^200 * i)arcsch(-10^200 * i)arcsch(10^(-60))arcsch(10^(-60) * i)arcsch(-10^(-60) * i)arcsec(10^10)arcsec(10^10 * i)arcsec(-10^10 * i)arcsec(10^20)arcsec(10^20 * i)arcsec(-10^20 * i)arcsec(10^60)arcsec(10^60 * i)arcsec(-10^60 * i)arcsec(10^200)arcsec(10^200 * i)arcsec(-10^200 * i)arcsec(10^(-60))arcsec(10^(-60) * i)arcsec(-10^(-60) * i)arccsc(10^10)arccsc(10^10 * i)arccsc(-10^10 * i)arccsc(10^20)arccsc(10^20 * i)arccsc(-10^20 * i)arccsc(10^60)arccsc(10^60 * i)arccsc(-10^60 * i)arccsc(10^200)arccsc(10^200 * i)arccsc(-10^200 * i)arccsc(10^(-60))arccsc(10^(-60) * i)arccsc(-10^(-60) * i)arccot(10^10)arccot(10^10 * i)arccot(-10^10 * i)arccot(10^20)arccot(10^20 * i)arccot(-10^20 * i)arccot(10^60)arccot(10^60 * i)arccot(-10^60 * i)arccot(10^200)arccot(10^200 * i)arccot(-10^200 * i)arccot(10^(-60))arccot(10^(-60) * i)arccot(-10^(-60) * i)sqrt(1 + 10^(-10))(1 + 10^(-10))^(1/3)(1 + 10^(-10))^(2/3)(1 + 10^(-10))^(-1/2)ln(1 + 10^(-10))sqrt(1 + -10^(-10))(1 + -10^(-10))^(1/3)(1 + -10^(-10))^(2/3)(1 + -10^(-10))^(-1/2)ln(1 + -10^(-10))sqrt(1 + 10^(-10) * i)(1 + 10^(-10) * i)^(1/3)(1 + 10^(-10) * i)^(2/3)(1 + 10^(-10) * i)^(-1/2)ln(1 + 10^(-10) * i)sqrt(1 + -10^(-10) * i)(1 + -10^(-10) * i)^(1/3)(1 + -10^(-10) * i)^(2/3)(1 + -10^(-10) * i)^(-1/2)ln(1 + -10^(-10) * i)sqrt(1 + 10^(-20))(1 + 10^(-20))^(1/3)(1 + 10^(-20))^(2/3)(1 + 10^(-20))^(-1/2)ln(1 + 10^(-20))sqrt(1 + -10^(-20))(1 + -10^(-20))^(1/3)(1 + -10^(-20))^(2/3)(1 + -10^(-20))^(-1/2)ln(1 + -10^(-20))sqrt(1 + 10^(-20) * i)(1 + 10^(-20) * i)^(1/3)(1 + 10^(-20) * i)^(2/3)(1 + 10^(-20) * i)^(-1/2)ln(1 + 10^(-20) * i)sqrt(1 + -10^(-20) * i)(1 + -10^(-20) * i)^(1/3)(1 + -10^(-20) * i)^(2/3)(1 + -10^(-20) * i)^(-1/2)ln(1 + -10^(-20) * i)sqrt(1 + 10^(-60))(1 + 10^(-60))^(1/3)(1 + 10^(-60))^(2/3)(1 + 10^(-60))^(-1/2)ln(1 + 10^(-60))sqrt(1 + -10^(-60))(1 + -10^(-60))^(1/3)(1 + -10^(-60))^(2/3)(1 + -10^(-60))^(-1/2)ln(1 + -10^(-60))sqrt(1 + 10^(-60) * i)(1 + 10^(-60) * i)^(1/3)(1 + 10^(-60) * i)^(2/3)(1 + 10^(-60) * i)^(-1/2)ln(1 + 10^(-60) * i)sqrt(1 + -10^(-60) * i)(1 + -10^(-60) * i)^(1/3)(1 + -10^(-60) * i)^(2/3)(1 + -10^(-60) * i)^(-1/2)ln(1 + -10^(-60) * i)sqrt(1 + 10^(-200))(1 + 10^(-200))^(1/3)(1 + 10^(-200))^(2/3)(1 + 10^(-200))^(-1/2)ln(1 + 10^(-200))sqrt(1 + -10^(-200))(1 + -10^(-200))^(1/3)(1 + -10^(-200))^(2/3)(1 + -10^(-200))^(-1/2)ln(1 + -10^(-200))sqrt(1 + 10^(-200) * i)(1 + 10^(-200) * i)^(1/3)(1 + 10^(-200) * i)^(2/3)(1 + 10^(-200) * i)^(-1/2)ln(1 + 10^(-200) * i)sqrt(1 + -10^(-200) * i)(1 + -10^(-200) * i)^(1/3)(1 + -10^(-200) * i)^(2/3)(1 + -10^(-200) * i)^(-1/2)ln(1 + -10^(-200) * i)Ci(10^10 + i)Ci(1 + 10^10 * i)Ci(10^10 - i)Ci(-1 + 10^10 * i)Ci(10^20 + i)Ci(1 + 10^20 * i)Ci(10^20 - i)Ci(-1 + 10^20 * i)Ci(10^60 + i)Ci(1 + 10^60 * i)Ci(10^60 - i)Ci(-1 + 10^60 * i)Ci(10^200 + i)Ci(1 + 10^200 * i)Ci(10^200 - i)Ci(-1 + 10^200 * i)Ci(10^(-60) + i)Ci(1 + 10^(-60) * i)Ci(10^(-60) - i)Ci(-1 + 10^(-60) * i)Si(10^10 + i)Si(1 + 10^10 * i)Si(10^10 - i)Si(-1 + 10^10 * i)Si(10^20 + i)Si(1 + 10^20 * i)Si(10^20 - i)Si(-1 + 10^20 * i)Si(10^60 + i)Si(1 + 10^60 * i)Si(10^60 - i)Si(-1 + 10^60 * i)Si(10^200 + i)Si(1 + 10^200 * i)Si(10^200 - i)Si(-1 + 10^200 * i)Si(10^(-60) + i)Si(1 + 10^(-60) * i)Si(10^(-60) - i)Si(-1 + 10^(-60) * i)Ei(10^10 + i)Ei(1 + 10^10 * i)Ei(10^10 - i)Ei(-1 + 10^10 * i)Ei(10^20 + i)Ei(1 + 10^20 * i)Ei(10^20 - i)Ei(-1 + 10^20 * i)Ei(10^60 + i)Ei(1 + 10^60 * i)Ei(10^60 - i)Ei(-1 + 10^60 * i)Ei(10^200 + i)Ei(1 + 10^200 * i)Ei(10^200 - i)Ei(-1 + 10^200 * i)Ei(10^(-60) + i)Ei(1 + 10^(-60) * i)Ei(10^(-60) - i)Ei(-1 + 10^(-60) * i)Measurements
dotnet test Sources/Tests/UnitTests -f net10.0: 22068 passed, 0 failed, 13 skipped.FSharpWrapperUnitTests: 135 passed. Then the two new solver rows,Issue2677_TheLogarithmOfAWrittenDecimalOnTheUnitCircleIsImaginary, were run with the other arcoth, arcsch, arsech, a square root and Ci drop a part much smaller than their input #2677 tests: 32 passed. Before the last commit their roots' logarithms had real parts near1e-101.trigcheck under scaling, at 10^-12, 10^12, 10^30 and 10^-30, for
eqs1121,eqsexp1121andeqsinv1121: 0 differ in each of the 12 runs.The 275-row sweep has the same verdicts after the last commit: the 43 wrong → right rows hold.
On the merge with e89bc39: the C# suite passes 22076, with 0 failed and 13 skipped, and the F# suite passes 135. trigcheck at the four scales finds 0 differences, and the sweep verdicts are unchanged.
symlimitcheck, alternating, user CPU in seconds: master 26.55 and 26.31, branch 26.62 and 26.11. The reports are identical. Before the unit-circle commit the branch took 30.6 s; an instrumented run put 4.2 s of that in the logarithm near 1, and the same instrumentation now measures 43 ms with no re-evaluations.
limitcheck on the same merge, alternating: master 28.21 and 28.65, branch 29.56 and 28.82. Same verdicts.
One existing test changed.
AComplexFunctionKeepsASmallPartTestpinned the real part ofln(1 + 10^(-60) * i)as0. It is5E-121,ln|1 + 10^(-60) i|. The answer got better, and the test now says so.limitcheck, 600 expressions, same verdicts on both builds (compared 4872, 0 wrong). Timings alternate between the builds on one machine under the chain lock, user CPU in seconds:
Against the master runs alternated with it, the last commit costs about +1.4% (29.2 against 28.8). The first version also evaluated again every 1 that an inexact expression evaluated to, which was +17%. Ablation put that on the 1s: 32.0 s with them, 29.2 s with the 0s alone, 27.8 s with neither. The 1s were dropped. The cost of that is that
ln(e^(10^(-60)))stays 0, because the downcasting roundse^(10^(-60))onto the integer 1 before the logarithm sees it.The sweep's 275 rows took 0.84 s on master and 1.41 s on the branch. The difference is the rows that are now evaluated again, at up to 820 digits.
Changed answers
All are in
BREAKING-CHANGES.md. Two of them are not dropped parts:(-8 + 10^(-90) * i)^(1/3)is now the principal root1 + 1.732i, where it was the real root-2. The base is not real, so the "odd roots of negative reals are real" convention does not reach it.log(1 + 10^(-60), 2)gains digits in its last places:…680.36066…against master's…680.36524…. Its true value isln 2 / 10^(-60).🤖 Generated with Claude Code