Andrew Prestridge | November 23, 2026
One Small Formula Behind Every Gear
Almost every spur and helical gear calculation goes through one small function, the involute function inv α = tan α − α, or its inverse. Drawing an involute is easy. Getting the same correct answer from it on every machine takes more care, and inspection is where that care pays off.
We have been working on exactly that problem, and we are writing it up as a paper for arXiv. The paper measures, and where possible proves, the accuracy of our implementation of both functions, compares the inverse with methods common in gear software, and translates the differences into micrometres. The test vectors behind those results are already public, so you can check any tool against them [1].
Where the Involute Function Shows Up
The forward function gives tooth thickness at any diameter, and span (base tangent) measurement uses it at the reference pressure angle. The inverse, which finds the angle α from a value y = inv α, is needed for:
- Measurement over pins or balls. The pressure angle at the pin centre comes from the inverse, and the measurement M follows from it.
- Centre distance and backlash. The working pressure angle of a shifted pair, or of gears at a non-standard centre distance, comes from the inverse, and so does the centre distance for a given backlash.
- Profile inspection. Every nominal flank point, whether in a drawing, a DXF or STEP file or an inspection nominal, is computed through inv φ.
The inverse has no closed form. Gear programs usually solve it by iteration or use an explicit approximation such as Cheng's [2].
Why It Is Harder Than It Looks
Low on the flank, near the base circle, the TIF and the SAP, the local pressure angle is small, and tan α and α share most of their leading digits. Subtracting them throws those digits away. At α = 10⁻³ rad the textbook formula in double precision (binary64) keeps about 9 correct digits. Shorter formats do worse: at that angle, binary32 keeps 1 correct digit, and binary16 and a 32-bit fixed-point format keep none.
There is also a portability problem. IEEE 754 does not require the tangent to be correctly rounded, so math libraries differ in its last bits, and the subtraction magnifies those differences. Under Node.js 24.22.3, plain Math.tan(a) - a returned different bits on arm64 and x86-64 for 442 of 58,392 test inputs.
Where the Micrometres Actually Come From
The honest answer is not "naive arithmetic ruins your gears." A converged binary64 inverse, even a naive one, contributes less than 10⁻¹⁰ µm to measurement over pins or to centre distance in the cases we studied. The micrometres come from elsewhere:
- Shortcut formulas used in place of a converged inverse. Cheng's explicit approximation, used without iteration, puts 2.5 to 42.5 µm into the measurement over pins for gears from 20 mm to 1 m pitch diameter. For a shifted pair (m = 10 mm, z₁ = z₂ = 50) it puts 24.6 µm into the centre distance. Using only the leading term of the series costs 104 to 2,684 µm over pins.
- Short formats. Forward evaluation in binary16, as on some accelerators, costs 20.7 µm in tooth thickness at φ = 5° on a 1 m gear.
- Where the pin touches. On a 20-tooth, 2 mm module example, a form deviation on the contacted flanks is multiplied by 17.2 into M at the TIF, against 4.3 at mid-flank. A class-5 form deviation of 6 µm then moves M by about 103 µm instead of 26 µm. Across the gears we studied, that gain reaches 42.6 at a low contact. This is geometry and set-up, not arithmetic, and the standard mid-flank pin sizes of ANSI/AGMA 2002-D19 avoid it [3].
So the case for an accurate, reproducible involute is this: it removes approximation error outright, and it lets two inspection systems that evaluate the same nominal geometry agree to the last bit.
The Headline Results
All errors below are in ulps (units in the last place of a double), scored against an 80-digit reference.
- Forward function. On 50,000 committed test angles with 0 < |α| ≤ 3π/4, the largest error is 0.4999681 ulp. Every tested result is correctly rounded. This is a measurement, not a proof.
- Inverse function. It is proved faithfully rounded, with error at most 0.6 ulp, for 10⁻²⁰⁰ ≤ y < 2, using machine-checked proofs (interval arithmetic and the SMT solvers z3 and cvc5) that rest on a short, stated list of trusted inputs. The largest measured error on 50,000 points in that range is 0.5555115 ulp. On 171 values below 10⁻²⁰⁰, which are measured only, the largest error is 0.4982 ulp.
- A certified bracket. A separate entry point returns a bracket around the root. It is proved to contain the root for 0 < y ≤ 10⁶, and it did so at all 47,083 test points.
- Real gears fit inside. For external and internal spur gears with 5 to 500 teeth and pressure angles from 14.5° to 30°, every input falls inside the tested and proved ranges, by a wide margin.
- Same bits everywhere we tested. Both functions return identical bits on x86-64 and aarch64 Linux, Apple-silicon macOS, AWS Lambda and an NVIDIA DGX Spark, in Python and Node.js, on every finite test input.
How the Inverse Compares With Common Methods
We compared the inverse with public methods, all written in plain binary64 JavaScript, over the gear range of pressure angles from 0.5° to 60° (12,017 targets). These are all measured results:
| Method | Max error (ulp) | Correctly rounded | Worst-case correct digits |
|---|---|---|---|
| This work | 0.535 | 99.9% | 15.9 |
| Newton, Cheng seed, series residual | 2.11 | 71.1% | 15.3 |
| Newton, Cheng seed, textbook residual | 5.6 × 10³ | 37.0% | 12.0 |
| Newton, (3y)^1/3 seed, textbook residual | 5.7 × 10³ | 36.6% | 12.0 |
| Bisection to collapse, series residual | 2.77 | 47.4% | 15.2 |
| Series reversion, 12 terms | 3.6 × 10⁸ | 34.6% | 7.1 |
| Series reversion, 7 terms | 3.4 × 10¹⁰ | 13.1% | 5.1 |
| Cheng economized formula | 1.6 × 10¹⁴ | 0% | 1.6 |
Over this range our inverse's mean error is 0.249 ulp, and every result is faithfully rounded. Textbook Newton stalls at about 5,600 ulp (12.0 digits) however long it runs.
Reproducibility tells a similar story. On a 16,500-target set run in nine runtimes (Node.js 18 through 24 on x86-64 and arm64, Bun, and CPython), our inverse returned the same bits as the reference run on every input. The baseline methods, which call the runtime's own tangent, did not: textbook Newton differed on 1,556 to 1,693 inputs under Bun and on 269 to 320 under V8 on arm64. (The arm64 runs used emulation on an x86-64 host, not native hardware.)
The accuracy is not free. Our inverse is slower per call than a textbook Newton loop, and the paper reports the cost in full.
Check Any Tool Against the Test Vectors
Our algorithms are proprietary and are not described in the paper or here. What is public is everything you need to check our results, or your own software:
Dataset: Test vectors for the involute function and its inverse in IEEE 754 double precision, Zenodo, DOI 10.5281/zenodo.24481106, licensed CC BY 4.0 [1].
It contains the input bit patterns, an independent 80-digit reference value for each input, our recorded outputs and their errors, and the SHA-256 hashes of the outputs. Inputs are given as exact hexadecimal floats, so there is no decimal round-trip doubt.
To check a tool, run its involute or inverse involute on the inputs, compare the results with the reference column, and express the difference in ulps. Whether your gear software, spreadsheet or inspection package passes or not, we would be glad to hear what you find.
What Is Coming
The full paper, The involute function and its inverse in IEEE 754 double precision: measured and proved accuracy, and its effect on gear inspection, is coming to arXiv soon. Besides the results above, it covers the over-pins study in detail, the effect of hob pressure-angle error, input checks that gear software should make, and a measured SolidWorks Toolbox export, whose circular-arc flank departs from the involute over a span of 66.1 µm between the SAP and the tip and whose teeth carry 0.235 mm of built-in backlash at the pitch circle. It is also explicit about its limits: the forward bound is measured, not proved, and bit identity is verified only on the machines and runtimes it names.
Try the Calculators
If you design or inspect gears, take a look at our gear calculators at GearCalculators.com.
If you have a question or results from the test vectors to share, please send us an e-mail at contact@evolventdesign.com.
References
[1] A. Prestridge. Test vectors for the involute function and its inverse in IEEE 754 double precision. Dataset, Zenodo, 2026. CC BY 4.0. https://doi.org/10.5281/zenodo.24481106
[2] H. H. Cheng. Derivation of the explicit solution of the inverse involute function and its applications. Proc. 6th ASME International Power Transmission and Gearing Conference, Phoenix, AZ, 1992.
[3] AGMA. ANSI/AGMA 2002-D19: Tooth Thickness and Backlash Measurement of Cylindrical Involute Gearing. American Gear Manufacturers Association, 2019 (reaffirmed 2024). See clause 9.4.8.

Leave a comment