Two-Term Machin-Like Formulas are identities that express π/4 as the sum of two arctangent terms with carefully chosen rational parameters, often involving a dyadic coefficient.
Key methods include nested-radical parametrization and iterative recurrences that transform complex exponentiation into purely rational computations.
Refinements like Lehmer’s measure and continued fraction techniques enable high-precision π evaluation with accelerated convergence and manageable computational steps.
Two-term Machin-like formulas are identities that represent π/4 as a sum of two arctangent terms, typically with rational arguments and, in a widely studied family, a dyadic coefficient on one term. A central form is
4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,
with u1,k chosen as an integer and u2,k obtained as a rational number determined by u1,k and k (Abrarov et al., 2021). Research on these formulas has focused on exact derivation from the arctangent addition law, nested-radical and purely rational constructions of the parameters, reduction of Lehmer’s measure, and high-precision evaluation strategies that avoid irrational numbers in the final computation (Abrarov et al., 2017, Abrarov et al., 2017, Abrarov et al., 2020). Later work has extended the subject to classification results, continued-fraction refinements, and rational approximations with squared convergence (Gasull et al., 2023, Abrarov et al., 2024, Farhi, 15 Jan 2026).
1. General algebraic structure
The algebraic basis of a two-term Machin-like formula is the addition law
arctanx+arctany=arctan(1−xyx+y),
together with the doubling identity
2arctanx=arctan(1−x22x).
In the standard dyadic family, one sets
x=tan(2k−1arctan(1/u1))
and then chooses y so that
4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,0
Solving gives
4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,1
and therefore
4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,2
which yields the required identity for 4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,3 (Abrarov et al., 2021).
An equivalent route uses complex exponentials. One shows
4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,4
or, in a closely related formulation,
4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,5
from which the second parameter emerges as a rational number whenever the first one is rational (Abrarov et al., 2021, Abrarov et al., 2017). This complex representation is central in the literature because it converts the analytic condition that the arctangent sum equal 4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,6 into an explicit algebraic relation.
The general theory is not restricted to the dyadic coefficient 4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,7. A broader two-term setting considers
4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,8
with 4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,9 and u1,k0, u1,k1 (Farhi, 15 Jan 2026). This wider formulation supports later refinement procedures based on continued fractions, while the dyadic family remains the main computationally oriented branch of the subject.
2. Nested-radical parametrization of the first argument
A classical construction of the “large” integer in the dyadic family uses nested radicals. Defining
u1,k2
one sets
u1,k3
This provides a closed-form choice of the first integer parameter (Abrarov et al., 2021). Related work also allows the ceiling choice
The nested radicals are directly tied to classical trigonometric half-angle structure. In the notation u1,k5, u1,k6, one has
u1,k7
and
u1,k8
which tends to infinity with u1,k9 (Abrarov et al., 24 Sep 2025). This explains why the first argument in the arctangent becomes very small as u2,k0 increases.
The classical Machin formula appears as a small-u2,k1 instance of this scheme. The computation
u2,k2
recovers
u2,k3
(Abrarov et al., 2021). In this way the literature places Machin’s original identity inside a systematic infinite family indexed by u2,k4.
The nested-radical parametrization is compact, but it requires repeated square roots. Later papers therefore distinguish between the theoretical convenience of the closed form and the practical difficulty of carrying deep surd chains at large u2,k5 (Abrarov et al., 2021, Abrarov et al., 2020).
3. Iterative determination of the second argument and surd-free updates
Once the first parameter is fixed, the second one can be computed by a short real iteration rather than by direct exponentiation of a complex rational. In one standard formulation, define
u2,k6
and for u2,k7 iterate
u2,k8
Then
u2,k9
This “u1,k0-u1,k1 iteration” produces exactly the rational second parameter that makes the two-term identity valid (Abrarov et al., 2021).
Equivalent recurrences appear throughout the literature. With
u1,k2
one may iterate
u1,k3
and again obtain
u1,k4
(Abrarov et al., 2017). The computational purpose is the same in each version: direct raising of u1,k5 is avoided.
A further development replaces the nested-radical construction of the first parameter by a purely rational iteration. For large u1,k6, one may postulate
u1,k7
The tangent value is then computed by repeated doubling,
u1,k8
so that the update uses only rational operations and the real function u1,k9 (Abrarov et al., 2021). The stated computational observation is that in practice only k0–k1 nested calls suffice, no matter how large k2 is.
Another iterative route begins with
k3
and shows that
k4
A second application of the addition law yields the compact identity
k5
or, equivalently,
k6
(Abrarov et al., 24 Sep 2025). This suggests a structurally different, but still two-term, normalization of the same underlying half-angle mechanism.
4. Lehmer’s measure and convergence behavior
Lehmer introduced a measure for Machin-like formulas,
(Gasull et al., 2023). Across these formulations, the common interpretation is that smaller measure corresponds to faster convergence.
A landmark example in the computational branch takes arctanx+arctany=arctan(1−xyx+y),1 and
arctanx+arctany=arctan(1−xyx+y),2
The resulting second parameter is a rational number whose numerator and denominator have arctanx+arctany=arctan(1−xyx+y),3 and arctanx+arctany=arctan(1−xyx+y),4 decimal digits, respectively, and the corresponding measure is reported as
arctanx+arctany=arctan(1−xyx+y),5
For this construction, each additional term in the arctangent series improves arctanx+arctany=arctan(1−xyx+y),6 by about arctanx+arctany=arctan(1−xyx+y),7 correct decimal digits, and the paper describes this as the smallest Lehmer measure ever reported for the Machin-like formulas for arctanx+arctany=arctan(1−xyx+y),8 (Abrarov et al., 2017).
The later theoretical picture is broader. Gasull, Luca, and Varona proved that in the two-term case one can make arctanx+arctany=arctan(1−xyx+y),9 through a construction based on convergents to 2arctanx=arctan(1−x22x).0 and a rational-function mechanism they call the “Machin’s formulas machine” (Gasull et al., 2023). This does not negate the earlier computational record; rather, it shows that the existence theory allows arbitrarily small Lehmer measure, while explicit constructions with practical computational behavior must still address the size and handling of the rational parameters.
The relation between convergence and argument size is also visible in the elementary Maclaurin estimate
2arctanx=arctan(1−x22x).1
for small 2arctanx=arctan(1−x22x).2. Since two-term Machin-like formulas are designed so that both reciprocal arguments are small, increasing 2arctanx=arctan(1−x22x).3 can greatly accelerate convergence (Abrarov et al., 2017). The computational challenge is that the second rational parameter often grows to enormous size, so asymptotic speed in the series variable does not automatically translate into low wall-clock cost.
5. Numerical evaluation and rational approximations
A major computational issue is that the second argument may be tiny while its rational representation is huge. Direct evaluation of 2arctanx=arctan(1−x22x).4 by a power series can therefore be slowed by large intermediate numerators and denominators (Abrarov et al., 2017). To address this, the literature applies Newton–Raphson to
2arctanx=arctan(1−x22x).5
with update
2arctanx=arctan(1−x22x).6
This gives quadratic convergence: each iteration roughly doubles the number of correct digits (Abrarov et al., 2017).
A concrete example takes 2arctanx=arctan(1−x22x).7 and 2arctanx=arctan(1−x22x).8. Using the nested-radical prescription, one obtains an explicit rational 2arctanx=arctan(1−x22x).9, starts from a coarse value of x=tan(2k−1arctan(1/u1))0, and then refines x=tan(2k−1arctan(1/u1))1 by Newton–Raphson. The reported sequence improves from about x=tan(2k−1arctan(1/u1))2 correct digits of x=tan(2k−1arctan(1/u1))3 to x=tan(2k−1arctan(1/u1))4 and then to about x=tan(2k−1arctan(1/u1))5 digits in successive iterations (Abrarov et al., 2017). Related work argues that this evaluation strategy establishes the unconditional applicability of Lehmer’s measure in the two-term rational case, because the algorithm never requires exponentiating the giant rational x=tan(2k−1arctan(1/u1))6; the only use of x=tan(2k−1arctan(1/u1))7 is a single subtraction inside a Newton–Raphson step (Abrarov et al., 2020).
A separate line of work replaces both surds and trigonometric function calls by a rational approximation built from the binary expansion of x=tan(2k−1arctan(1/u1))8. In that setting,
x=tan(2k−1arctan(1/u1))9
with y0, is approximated by
y1
where
y2
The resulting error satisfies
y3
and the paper describes this as squared convergence in computing digits of y4 without any trigonometric functions and surd numbers (Abrarov et al., 2024). This suggests that two-term Machin-like structure can function not only as an exact identity but also as the basis of purely rational approximation algorithms.
6. Refinements, classifications, and later theoretical developments
The two-term theory now includes both classification results and transformation procedures. In the 2-integer setting, Gasull, Luca, and Varona prove that the only solutions of
y5
with y6 of the form y7 or y8, consist of ten sporadic cases plus two infinite y9-parameter families (Gasull et al., 2023). The two families are
This establishes a rare complete classification statement inside the two-term landscape.
The same paper also formulates the “Machin’s formulas machine.” For suitable rational functions 4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,02 satisfying
one obtains infinitely many two-term formulas by choosing parameters so that the resulting arctangent arguments stay inside 4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,04 (Gasull et al., 2023). In the special case 4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,05, the authors state that the method is quite useful, recovers most known formulas, gives some new ones, and allows one to prove in an easy way that there are two terms Machin formulas with Lehmer measure as small as desired.
A different extension is the refinement process for a general two-term formula
(Farhi, 15 Jan 2026). Closed forms in terms of the convergents 4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,12 of 4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,13 are given by
These later developments show that two-term Machin-like formulas are not a single isolated family but a broad class of exact identities and approximation schemes. The subject now spans nested radicals, rational recurrences, Newton–Raphson evaluation, continued-fraction refinements, and structural classification, while preserving the defining feature that 4π=2k−1arctan(u1,k1)+arctan(u2,k1),k∈Z,k≥1,19 is represented by only two arctangent contributions.