I present a way to find fractions that are as close as desired to a real number of the form
Below we will see that this can be generalized to cube, 4-th and 5-th roots with a slight adptation. Expressions approximating
Let
Here are a few examples:
| a | n | approximant | precision | |
|---|---|---|---|---|
| 2 | 2 | |||
| 2 | 3 | |||
| 2 | 4 | |||
| 2 | 5 | |||
| 2 | 6 | |||
| 2 | 7 | |||
| 2 | 8 | |||
| 2 | 9 | |||
| 2 | 10 | |||
| 2 | 16 | |||
| 2 | 32 | |||
| 3 | 2 | |||
| 3 | 3 | |||
| 3 | 4 | |||
| 3 | 5 | |||
| 3 | 6 | |||
| 3 | 7 | |||
| 3 | 8 | |||
| 3 | 9 | |||
| 3 | 10 | |||
| 3 | 16 | |||
| 3 | 32 |
Note that the sequence of numerators for the approximation of
If we try to apply the same method for approximating
with precision
with precision
With exponent 4:
the precision being
where each approximation is followed by its precision between parenthesis. Below is a table giving the approximations that can be obtained with next few exponents
| n | Polynomial | Approximant | Precision |
|---|---|---|---|
The method described for the approximation of
- computing the polynomial
$P_m$ is equivalent to reducing$(X - d)^m$ in$\mathbb{Q}[X]/(X^{n}-a)$ - the whole process can be done with d =
$\lceil \sqrt[n]{a} \rceil$ since we only need$\lvert\sqrt[n]{a}-d\rvert \lt 1$ . Actually$a$ does not need to be an integer, it can be any rational, also$d$ does not have to be either$\lfloor \sqrt[n]{a} \rfloor$ or$\lceil \sqrt[n]{a} \rceil$ , in fact$d$ can be any rational number$q$ such that$\lvert\sqrt[n]{a}-q\rvert \lt 1$ . - Regarding the polynomials since we are actually working in
$\mathbb{Q}[X]/(X^{n}-a)$ ,$P_m$ will not produce a useful approximation until m >= n.
Let us treat the case of
The positive root yields
with a precision of 8.35319e-6. If we replace
If we replace
If we proceed with a more precise approximation of
To get an approximation of
If we repeat this process with approximations of
I wrote a PARI/GP script which can generate this kind of approximations. It is based on the principles described in this page. To invoke the script, start by installing PARI/GP, run it and then call function approximate_nthroot(n, a, depth):
$ gp
gp > \r proximar.gp
gp > approximate_nthroot(2, 5, 1);
which will output approximations of
| 2 | 2.36067977 e-1 |
| 9/4 | 1.39320225 e-2 |
| 38/17 | 7.73859853 e-4 |
| 161/72 | 4.31336113 e-5 |
| 682/305 | 2.40372930 e-6 |
| 2889/1292 | 1.33955319 e-7 |
| 12238/5473 | 7.46507382 e-9 |
| 51841/23184 | 4.16014306 e-10 |
| 219602/98209 | 2.31836827 e-11 |
Here is an example for a cube root,
gp > approximate_nthroot(3, 17, 4);
| 3 | 4.28718409 e-1 |
| (9+sqrt(41))/6 | 4.09421775 e-3 |
| 5/2 | 7.12815907 e-2 |
| 185/72 | 1.83714621 e-3 |
| 765/298 | 4.16749670 e-3 |
| 28465/11088 | 4.09183597 e-3 |
| 117685/45842 | 4.09429517 e-3 |
| (91+sqrt(34849))/108 | 1.80955021 e-4 |
| 139/54 | 2.79248342 e-3 |
| 25963/10098 | 1.78401908 e-4 |
| 4850911/1886706 | 1.80952827 e-4 |
| 906341467/352511082 | 1.80955019 e-4 |
| 169340326999/65862971154 | 1.80955021 e-4 |
| (75+6*sqrt(9201))/253 | 1.25823193 e-5 |
| 651/253 | 1.84093899 e-3 |
| 20817/8096 | 1.18278124 e-5 |
| 7990473/3107599 | 1.25820120 e-5 |
| 255591051/99402688 | 1.25823191 e-5 |
| 98107011219/38155094197 | 1.25823193 e-5 |
| (-279+sqrt(3375289))/606 | 1.12656428 e-6 |
| 779/303 | 3.24494949 e-4 |
| 1431203/556611 | 1.10931669 e-6 |
| 2629260131/1022548947 | 1.12656520 e-6 |
| 4830208477187/1878522605619 | 1.12656428 e-6 |
| 8873566239416099/3451030085332563 | 1.12656428 e-6 |
And for
| 2 | 8.77976299 e-2 |
| 1 + ((19/8 + 1/24*sqrt(10003/3))/2)^(1/3) - ((-19/8 + 1/24*sqrt(10003/3))/2)^(1/3) | 1.63244203 e-6 |
| 1 + 1/2*(115/6)^(1/3) - 1/2*(1/6)^(1/3) | 2.48675893 e-2 |
| 9/4 | 1.62202370 e-1 |
| 1 + 1/2*((27+sqrt(447))/18) - 1/2*((3/4+1/4*sqrt(13))/3) | 2.57407522 e-2 |
| 49/24 | 4.61309633 e-2 |
| 8311/4032 | 2.65377093 e-2 |
| 890543/431880 | 2.57827184 e-2 |
| 17842283/8652672 | 2.57429259 e-2 |
| 5083361733/2465190008 | 2.57408649 e-2 |
| 1 + 1/2*((533/6+1/6*sqrt(1442713))/108) - 1/2*((1/3+5/6*sqrt(5/2))/3) | 2.48926181 e-2 |
| 433/216 | 8.31680003 e-2 |
| 711427/345888 | 3.09844418 e-2 |
| 2070378533/1003965384 | 2.55965162 e-2 |
| 2973454099175/1441449116224 | 2.49748319 e-2 |
| 5116770554669967/2480382941881048 | 2.49022325 e-2 |
| 1 + 1/2*((235/2+1/2*sqrt(6002985))/1505/3) - 1/2*((-5/24+1/8*sqrt(1291/3))/13/3) | 2.48691669 e-2 |
| 64461/31304 | 2.86039167 e-2 |
| 474642499/230084400 | 2.48915876 e-2 |
| 135931278126781/65892390167240 | 2.48693042 e-2 |
| 2979110623495558171/1444117272201895200 | 2.48691678 e-2 |
| 2559409631914250914578981/1240668146204832707010376 | 2.48691670 e-2 |
| 1 + 1/2*((-2259/2+1/2*sqrt(401741203/3))/1740) - 1/2*((-7/2+1/3*sqrt(973/2))/7) | 2.48676801 e-2 |
| 100571/48720 | 2.35324411 e-2 |
| 6978323029/3382727040 | 2.48694225 e-2 |
| 626163467661733469/303531133975350960 | 2.48676779 e-2 |
| 2418447663789413883467/1172336299642154169600 | 2.48676801 e-2 |
| 1302037558106569125953006574937/631159365455068772146904413040 | 2.48676801 e-2 |
| 1 + 1/4*(39931/261)^(1/3) - 1/4*(259/261)^(1/3) | 5.94350537 e-5 |
| 2 | 8.77976299 e-2 |
| 1 + 1/4*((75+sqrt(635495/87))/30) - 1/4*((3+5*sqrt(31/87))/6) | 6.42708859 e-5 |
| 101/48 | 1.63690367 e-2 |
| 164537/78880 | 1.88231553 e-3 |
| 324286513/155307152 | 2.35720910 e-4 |
| 26355444619547/12623265946560 | 4.91072871 e-5 |
| 257270583322774267/123221951666650128 | 6.56106944 e-5 |
<... truncated ...>
Note that the case n = 5, is not yet implemented.
| n | Polynomial | Approximations | Precision |
|---|---|---|---|
| 3 | (3+sqrt(21))/6 | 3.841566 e-3 | |
| 4/3 | 7.341228 e-2 | ||
| 19/15 | 6.745617 e-3 | ||
| 91/72 | 3.967839 e-3 | ||
| 436/345 | 3.847066 e-3 | ||
| 2089/1653 | 3.841806 e-3 | ||
| 10009/7920 | 3.841576 e-3 | ||
| 4 | 6X^2 - 2X - 7 | (1+sqrt(43))/6 | 3.479625 e-4 |
| 4/3 | 7.341228 e-2 | ||
| 53/42 | 1.983712 e-3 | ||
| 359/285 | 2.719271 e-4 | ||
| 4867/3864 | 3.454805 e-4 | ||
| 32992/26193 | 3.478815 e-4 | ||
| 447287/355110 | 3.479599 e-4 | ||
| 5 | (-5+sqrt(633))/16 | 4.715328 e-5 | |
| 5/4 | 9.921050 e-3 | ||
| 63/50 | 7.895011 e-5 | ||
| 790/627 | 4.705218 e-5 | ||
| 19813/15725 | 4.715360 e-5 | ||
| 496905/394379 | 4.715328 e-5 | ||
| 12462251/9890925 | 4.715328 e-5 | ||
| 6 | (-12+sqrt(249))/3 | 9.770542 e-6 | |
| 4/3 | 7.341228 e-2 | ||
| 121/96 | 4.956168 e-4 | ||
| 3844/3051 | 6.267856 e-6 | ||
| 122161/96960 | 9.746265 e-6 | ||
| 3882244/3081363 | 9.770373 e-6 | ||
| 123376681/97924896 | 9.770541 e-6 | ||
| 7 | (59-sqrt(37))/42 | 1.317557 e-5 | |
| 53/42 | 1.983712 e-3 | ||
| 635/504 | 4.149742 e-7 | ||
| 7673/6090 | 1.326866 e-5 | ||
| 92711/73584 | 1.317494 e-5 | ||
| 1120205/889098 | 1.317558 e-5 | ||
| 13535171/10742760 | 1.317557 e-5 | ||
| 8 | (25+sqrt(645))/40 | 2.050651 e-7 | |
| 5/4 | 9.921050 e-3 | ||
| 63/50 | 7.895011 e-5 | ||
| 635/504 | 4.149742 e-7 | ||
| 16001/12700 | 2.099476 e-7 | ||
| 20160/16001 | 2.050267 e-7 | ||
| 2032001/1612800 | 2.050654 e-7 | ||
| 9 | (33+sqrt(13969))/120 | 1.527106 e-8 | |
| 151/120 | 1.587717 e-3 | ||
| 35681/28320 | 1.266489 e-6 | ||
| 8427511/6688920 | 1.630500 e-8 | ||
| 1990498241/1579859520 | 1.527023 e-8 | ||
| 470136822871/373147848120 | 1.527106 e-8 | ||
| 111041862618401/88133985834720 | 1.527106 e-8 | ||
| 10 | (-31+4*sqrt(9145))/279 | 1.839639 e-9 | |
| 353/279 | 5.311925 e-3 | ||
| 16873/13392 | 1.025238 e-5 | ||
| 12933401/10265247 | 2.165850 e-8 | ||
| 619605265/491781024 | 1.877958 e-9 | ||
| 474938572049/376958993895 | 1.839713 e-9 | ||
| 22753059484537/18059115254256 | 1.839639 e-9 |
| n | Polynomial | Approximations | Precision |
|---|---|---|---|
| 1 | 1 | 4.42250e-1 | |
| 3 | 1.51775e-2 | ||
|
|
5.77504e-2 | ||
|
|
1.08916e-1 | ||
|
|
2.44171e-2 | ||
|
|
1.45406e-2 | ||
|
|
1.52217e-2 | ||
| 4 | 2.34785e-3 | ||
|
|
2.55829e-2 | ||
|
|
2.14540e-3 | ||
|
|
2.34960e-3 | ||
| 5 | 5.60268e-4 | ||
|
|
1.56535e-1 | ||
|
|
6.73002e-3 | ||
|
|
3.27461e-4 | ||
|
|
5.69067e-4 | ||
| 6 | 2.46539e-4 | ||
|
|
5.77504e-2 | ||
|
|
5.82904e-4 | ||
|
|
2.44599e-4 | ||
|
|
2.46550e-4 | ||
| 7 | 1.02935e-4 | ||
|
|
1.77338e-3 | ||
|
|
9.92727e-5 | ||
|
|
1.02943e-4 | ||
| 8 | 5.90358e-6 | ||
|
|
3.10329e-2 | ||
|
|
3.86353e-3 | ||
|
|
4.98521e-4 | ||
|
|
5.66487e-5 | ||
|
|
6.03176e-6 | ||
|
|
5.88729e-6 | ||
|
|
5.90564e-6 | ||
| 9 | 9.14246e-7 | ||
|
|
2.79165e-4 | ||
|
|
1.01509e-5 | ||
|
|
9.36596e-7 | ||
|
|
9.14201e-7 | ||
|
|
9.14246e-7 | ||
| 10 | 2.17536e-7 | ||
|
|
1.07310e-3 | ||
|
|
5.60887e-4 | ||
|
|
4.85608e-7 | ||
|
|
2.90630e-7 | ||
|
|
2.17469e-7 | ||
|
|
2.17546e-7 | ||
|
|
2.17536e-7 | ||
|
|
2.17536e-7 | ||
|
|
2.17536e-7 | ||
|
|
2.17536e-7 |
Between parenthesis are the approximations used for the square root appearing in the root of the polynomial.
| Exponent of |
Approximant | Precision |
|---|---|---|
| 1 | 2 | 2.36068e-1 |
| 2 | 9/4 | 1.39320e-2 |
| 3 | 38/17 | 7.73860e-4 |
| 4 | 161/72 | 4.31336e-5 |
| 5 | 682/305 | 2.40373e-6 |
| 6 | 2889/1292 | 1.33955e-7 |
| 7 | 12238/5473 | 7.46507e-9 |
| 8 | 51841/23184 | 4.16014e-10 |
| 9 | 219602/98209 | 2.31837e-11 |
| 10 | 930249/416020 | 1.29198e-12 |
Authored by Youcef Lemsafer. Creation date: 2025.02.20.
This file is licensed under CC BY 4.0. The script is licensed under the MIT license.