Skip to content

Fix: Root solver converges prematurely in Std display mode#1680

Open
prismv wants to merge 1 commit intoc3d:devfrom
prismv:fix-1679
Open

Fix: Root solver converges prematurely in Std display mode#1680
prismv wants to merge 1 commit intoc3d:devfrom
prismv:fix-1679

Conversation

@prismv
Copy link
Copy Markdown

@prismv prismv commented Apr 26, 2026

Fixes #1679

In Std mode, algebraic::epsilon() used DisplayDigits() + 1 = 21
as the convergence target regardless of Precision, causing the solver
to stop after ~20 digits instead of Precision - SolverImprecision.

The fix skips the std::min(disp+1, ...) clamp in Std mode and uses
max(prec - impr, 3) directly, consistent with documented behaviour.

Tested: Prec 1010, Std, 'cos X-X' 'X' 0.7 Root → ≥1004 accurate digits.

In Std mode, algebraic::epsilon() used DisplayDigits()+1=21 as
convergence target regardless of Precision. Fixes c3d#1679
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants