Skip to main content

Bisection Calculator

Two tabs over one root-finder — the Poisson Calculator's higher-or-lower search (guess, compare, keep the half that must hold the answer) set loose past Poisson tails.

Any equation takes anything you type — f(x), or a full equation f(x) = g(x) solved as f − g = 0 — scans an interval for sign flips, then bisects every bracket it finds and narrates each halving; type an expression with no x and it just evaluates it, a plain calculator on the same grammar. It is honest about the two traps a sign flip can hide: a pole (1/(x − 2)) pinches to a point where |f| explodes instead of vanishing — reported as a jump, not a root — and a curve that touches zero without crossing (x² + 0.05) gives bisection nothing to grab. Both have example chips.

Back-solve (λ₁, λ₂) runs the Shock Fit lab's per-row recipe as two of those searches: given the two lines, the two fair anchors and a frozen λ₃, it bisects the sum S = λ₁ + λ₂ out of the Total anchor (the total cannot see the split, so the trial grid puts S⁄2 a side), then the split out of the Handicap anchor with λ₂ = S − λ₁ substituted in. Both stages read the engine's own capped score grid, so the pair lands on the lab's trial row digit for digit — the lab's λ₁ λ₂ Back Solve column links straight here with its row prefilled.

/ steps an interval bound, Shift steps bigger.

Bisection facts
f continuous on [a, b] and f(a)·f(b) < 0 ⇒ a root lies inside (intermediate-value theorem)
After k halvings the window is (b − a)/2k wide — the midpoint misses the root by at most (b − a)/2k+1
Halvings to a tolerance τ: ⌈log₂((b − a)/τ)⌉ — here ⌈log₂(8/1e-6)⌉ = 23
Inputs
Functionf(x) or f(x) = g(x)
parsed as f(x) = Ptail(2.5, x) - 0.47854397 — the two sides moved onto one, solving f(x) = 0
+ − × ÷ ^ ( ) · juxtaposition (2x) · x, pi, e, tau · sin cos tan asin acos atan sinh cosh tanh exp ln log log2 sqrt cbrt abs floor ceil round sign min max pow atan2 · P Pcdf Ptail malay prob fact choose
Tryexamples
Interval starta
Left end of the search window.
|a| ≤ 10¹² and a < b
Interval endb
Right end of the search window.
|b| ≤ 10¹² and b > a
Toleranceτ
Stop once the window is this tight either side of its midpoint — the root's error bound.
Roots
x*root 1 — closed from bracket [2.5625, 2.625] in 15 halvingsf(root) = 2.361e-72.5879622
Scan the interval — 129 samples hunting sign flips
·sampled 129 points, one every 0.0625, across [0, 8]two neighbours with opposite signs trap a crossing between them — roots closer together than one spacing can hide1 bracket
1f flips − → + between x = 2.5625 and x = 2.625f(2.5625) = -0.006428, f(2.625) = 0.009284bracket 1
The halvings, narrated
0start with the scan's bracket: [2.5625, 2.625], width 0.062500f(2.5625) = -0.006428 and f(2.625) = 0.009284 — opposite signs, so a crossing is trapped inside
1window [2.5625000, 2.6250000] → midpoint 2.5937500f(mid) = 0.001456 — opposite sign to the negative low end, so the crossing sits below the midpoint▼ keep lower half
2window [2.5625000, 2.5937500] → midpoint 2.5781250f(mid) = -0.002479 — same sign as the negative low end, so the crossing sits above the midpoint▲ keep upper half
3window [2.5781250, 2.5937500] → midpoint 2.5859375f(mid) = -0.000510 — same sign as the negative low end, so the crossing sits above the midpoint▲ keep upper half
4window [2.5859375, 2.5937500] → midpoint 2.5898438f(mid) = 0.000474 — opposite sign to the negative low end, so the crossing sits below the midpoint▼ keep lower half
5window [2.5859375, 2.5898438] → midpoint 2.5878906f(mid) = -1.777e-5 — same sign as the negative low end, so the crossing sits above the midpoint▲ keep upper half
6window [2.5878906, 2.5898438] → midpoint 2.5888672f(mid) = 0.000228 — opposite sign to the negative low end, so the crossing sits below the midpoint▼ keep lower half
7window [2.5878906, 2.5888672] → midpoint 2.5883789f(mid) = 0.000105 — opposite sign to the negative low end, so the crossing sits below the midpoint▼ keep lower half
8window [2.5878906, 2.5883789] → midpoint 2.5881348f(mid) = 4.369e-5 — opposite sign to the negative low end, so the crossing sits below the midpoint▼ keep lower half
9window [2.5878906, 2.5881348] → midpoint 2.5880127f(mid) = 1.296e-5 — opposite sign to the negative low end, so the crossing sits below the midpoint▼ keep lower half
10window [2.5878906, 2.5880127] → midpoint 2.5879517f(mid) = -2.405e-6 — same sign as the negative low end, so the crossing sits above the midpoint▲ keep upper half
11window [2.5879517, 2.5880127] → midpoint 2.5879822f(mid) = 5.278e-6 — opposite sign to the negative low end, so the crossing sits below the midpoint▼ keep lower half
12window [2.5879517, 2.5879822] → midpoint 2.5879669f(mid) = 1.436e-6 — opposite sign to the negative low end, so the crossing sits below the midpoint▼ keep lower half
13window [2.5879517, 2.5879669] → midpoint 2.5879593f(mid) = -4.842e-7 — same sign as the negative low end, so the crossing sits above the midpoint▲ keep upper half
14window [2.5879593, 2.5879669] → midpoint 2.5879631f(mid) = 4.762e-7 — opposite sign to the negative low end, so the crossing sits below the midpoint▼ keep lower half
15window [2.5879593, 2.5879631] → midpoint 2.5879612f(mid) = -4.001e-9 — same sign as the negative low end, so the crossing sits above the midpoint▲ keep upper half
window is 1.91e-6 wide — at most the 1e-6 tolerance either side of the midpointcheck: f(2.5879622) = 2.361e-72.5879622