PreprintPDF Available

Square root formulas with initial control of the correct decimals precision output

Authors:
  • Independent Researcher
Preprints and early-stage research may not have been peer reviewed yet.

Abstract

All the square root calculation methods and algorithms can not replace the square root √ function in equations, they requires an initial guess or starting value and / or many calculations steps or iterations to reach the square root at an arbitrarily precision which mean they need an algorithm to perform the calculation, until now it is impossible to deduce the square root of positive real number from a function. I have successfully build and tested many formulas to calculate the square root of all the positive real number in one step of calculation, based on a discovery of a pattern, this is not a calculation method only it is a mathematic law and formulas that illustrate the incontestable relation between the square root and the trigonometric function according to a specific pattern, where the output precision could be controlled and predetermined by determining the desired correct numbers of decimals initially that do not necessitate any guess or starting values. These formulas can replace the square root function in equations for many purposes according to a predetermined precisions.
Square root formulas with initial control of the correct decimals
precision output.
Mones Kasem Jaafar
Independent Researcher
monesjaafar@gmail.com
P.O. Box 11231 Damascus Syria
Abstract
All the square root calculation methods and algorithms can not replace the square root
function in equations, they requires an initial guess or starting value and / or many
calculations steps or iterations to reach the square root at an arbitrarily precision
which mean they need an algorithm to perform the calculation, until now it is
impossible to deduce the square root of positive real number from a function.
I have successfully build and tested many formulas to calculate the square root of all
the positive real number in one step of calculation, based on a discovery of a pattern,
this is not a calculation method only it is a mathematic law and formulas that illustrate
the incontestable relation between the square root and the trigonometric function
according to a specific pattern, where the output precision could be controlled and
predetermined by determining the desired correct numbers of decimals initially that
do not necessitate any guess or starting values. These formulas can replace the square
root function in equations for many purposes according to a predetermined
precisions.
Keywords
Square root formulae; Root; controlled precision; starting value; guess value; Square
root calculation method
1. Introduction
The square root calculation methods such as Newton method [5,7,8], continued
fraction expansion [1] , reciprocal square roots [1] and many algorithms [6], are based
on guess and / or iterations and many calculations steps [1,6,7] to reach a desired
precision of the square root, with a developed algorithm we can certainly calculate
exactly the square root of any number at an arbitrarily and non predictable precision,
but there is no formula that can substitute the square root function in any equation
to calculate the square root in one step with a chosen and predictable precision.
I have developed many formulas to calculate the square root of any positive real
number without starting or guess value and without iteration or many calculations
steps or algorithm, instead I Introduced a precision factor input to control the desired
correct numbers of decimals initially according to the need of calculation, because in
practice the number of decimals is always fixed and limited, whatever the purpose of
the calculation even if we know exactly all the correct decimals that may extent to the
infinity, this is completely different from an approximate calculations since the
accuracy is controlled and known initially without limitation through this precision
factor , the formula is calculated using Pythagorean theorem [2]. which is not a
calculation method only it is mathematic law that illustrate the incontestable relation
between the square root and the trigonometric function according to a specific pattern.
These formulas can replace the square root √ function in mathematic and scientific
calculation and analysis for many purposes.
2. Methods
Consider the right triangle such as:
10n is the precision factor that determine initially the output precision of the square
root calculation:
n=1,2,3…n
m is the number of digits of x
n ≥ m to ensure the accuracy
γ = π/2
By Pythagoras we have that :
b2 = (√x)2 + (10n x)2
b = √((√x)2 + (10n x)2)
b = √(x + 102n x2) (1)
n = 1
n = 2
n = 3
n = 4
x
b = √(x + 102x2)
b = √(x + 104x2)
b = √(x + 106x2)
b = √(x + 108x2)
1
10.0498756211209
100.0049998750060
1000.0004999998800
10000.0000499999998
2
20.0499376557634
200.0049999375020
2000.0004999999400
20000.0000499999999
3
30.0499584026334
300.0049999583340
3000.0004999999600
30000.0000499999999
4
40.0499687890016
400.0049999687500
4000.0004999999700
40000.0000499999999
5
50.0499750249688
500.0049999750000
5000.0004999999700
50000.0000499999999
6
60.0499791840097
600.0049999791670
6000.0004999999800
60000.0000499999999
7
70.0499821556009
700.0049999821430
7000.0004999999800
70000.0000499999999
8
80.0499843847580
800.0049999843750
8000.0004999999800
80000.0000499999999
9
90.0499861188218
900.0049999861110
9000.0004999999900
90000.0000499999999
10
100.049987506246
1000.004999987500
10000.000499999990
100000.000049999999
11
110.049988641526
1100.004999988640
11000.000499999990
110000.000049999999
12
120.049989587671
1200.004999989580
12000.000499999990
120000.000049999999
Table (1) b calculation using formulae (1) with different n values.
b
10n x
x
β
γ
3. Results
Through numerical analysis and as shown in table (1) I found that there is a pattern
concerning b value proportional to n and 10n which is limited to (n+1) decimals
precision and correct decimals of b so that we can write the formula (1) according to
m digits input of x and for (n+1) correct number of decimals precision for b
calculation:
b = 10n x + 0.5. 10-n (2)
The mechanism of the new formula (2) is that the rules of n and 10n is to emphasis
the pattern by extremely decreasing α and increasing β and pushing the "mess" of
numbers away and "replacing" them by a controllable and predetermined known
number of correct decimals and precision by simply increasing n value.
The rule of the precision factor 10n is to control the precision output of the
calculation and reorganize the formula, this factor has a contradictive effect at the
same time on formula (2) it increase greatly the term 10n x and decrease greatly the
term 0.5. 10-n, this very small term must not be rounded to "0" or discarded in any
case, these two terms must stay together to perform the calculations.
Since this formula is correct up to (n+1) correct decimals output of b calculation, it
is not important anymore and we will not consider decimals after that, instead we can
expand indefinitely the precision of b calculation and the corrects decimals by simply
increasing n value.
Since that the formula (2) is not an approximate formula but a controlled and
predictable precision formula of correct decimals, so the term 0.5. 10-n must not be
rounded in any case specially for big value of n
We can conclude then the following formulas:
β = asin(10n x/b)
β = asin( x / (x + 0.5. 10-2n )) (3)
α = acos(10n x/b)
α = acos(x / (x + 0.5. 10-2n ) ) (4)
tan (β) = (10n x/√x) = 10n x
x = tan (β)/ 10n
x = tan (asin( x / (x + 0.5. 10-2n ))) / 10n (5)
tan (α) = √x /( 10n x) = 1/( 10n x)
x = 1/( 10n tan (α) )
x = 1/( 10n tan(acos(x / (x + 0.5. 10-2n )))) (6)
sin(α) = √x/b
x = b sin(α)
x = (10n x + 0.5. 10-n) sin(acos(x / (x + 0.5. 10-2n ))) (7)
cos(β) = √x /b
x = b cos(β)
x = (10n x + 0.5. 10-n) cos(asin( x / (x + 0.5. 10-2n ))) (8)
From numerical analysis, and according to the precision chosen, we can consider the
angle α as equal to tan(α ) = 1/(10n x), according to the following formulas:
x = 1/(10n acos( x / (x + 0.5. 10-2n ))) (9)
We can write also
x = 10n x acos( x / (x + 0.5. 10-2n )) (10)
3.1. Example of x calculation using formula (5)
x = tan (asin( x / (x + 0.5. 10-2n ))) / 10n
n = 1
n = 2
n = 3
n = 4
x
x
Formula (5)
Formula (5)
Formula (5)
Formula (5)
1
1
0.9987523389
0.9999875002
0.9999998750
0.9999999987
2
1.4142135624
1.4133305067
1.4142047236
1.4142134739
1.4142135640
3
1.7320508076
1.7313295705
1.7320435907
1.7320507352
1.7320508068
4
2
1.9993752928
1.9999937500
1.9999999385
1.9999999993
5
2.2360679775
2.2355091700
2.2360623873
2.2360679209
2.2360679769
6
2.4494897428
2.4489795918
2.4494846397
2.4494896923
2.4494897422
7
2.6457513111
2.6452789820
2.6457465865
2.6457512626
2.6457513105
8
2.8284271247
2.8279852866
2.8284227054
2.8284270786
2.8284271243
9
3
2.9995834201
2.9999958333
2.9999999607
2.9999999995
10
3.1622776602
3.1618824496
3.1622737073
3.1622776249
3.1622776613
11
3.3166247904
3.3162479654
3.3166210215
3.3166247540
3.3166247914
12
3.4641016151
3.4637408276
3.4640980067
3.4641015851
3.4641016147
Table (2) Square root calculation using formula (5) with different n values.
3.2. High precision example
let us choose n=18 and calculate2 using formula (5) with high precision program [9]:
2 = tan (asin( 2 / (2 + 0.5. 10-36 )) / 1018
The result is :
1.4142135623730950488016887242096980784812835277286296
2 n = 36 correct decimals
Since the correct square root of 2 is given as follow:
1.414213562373095048801688724209698078569671875376948073
3.3 Derivative formulas:
Through testing and numerical analysis I found that we can derivate the following
formulas:
Since we have:
x = (x)2
then we can write also:
x = tan2 (asin( x / (x + 0.5. 10-2n )) / 102n (11)
this can be done for all the above formulas
Through testing and numerical computing analysis I found that:
tan (asin((x + 0.5. 10-2n ) / x )) / 10n = -x i (12)
tan (asin( x / (x + 0.5. 10-2nπ/2)).10n = - 1/x (13)
tan ( k. asin( x / (x + 0.5. 10-2n )))/ 10n = x / k (14)
for k odd and integer and n > 3
tan ( k. asin( x / (x + 0.5. 10-2n ))). 10n = - k / x (15)
for k even and integer and n > 3
10n/(tan(k . acos(x / (x + 0.5. 10-2n )) ±π/2) = -k/x (16)
k ≤ 10 n/2 real number
(x + 0.5. 10-2n) sin(acos(x / (x + 0.5. 10-2n )) ±π/2) = ± x (17)
(x + 0.5. 10-2n) cos(asin( x / (x + 0.5. 10-2n ))±π/2) = x (18)
d√x /dx = d(tan (asin( x / (x + 0.5. 10-2n ))) / 10n)/dx (19)
∫ √x dx = ∫ (tan (asin( x / (x + 0.5. 10-2n ))) / 10n) dx (20)
The equation (17,18) are numerically equal and can be done for all the formula
(5,6,7,8,9,10) according to a chosen precision of calculation
There are many minor results for this section
3.4. Example of square root function replacement:
In physique and engineering the kinetic energy is defined as below:
Ek = 1/2 m v2
v = √( 2 Ek / m)
v = tan (asin(2 Ek / (2 Ek + m 0.5. 10-2n ))) / 10n (21)
we can use the formulas (6,7,8) for the same purpose.
In mathematics using Pythagorean theorem we can write:
d = √(a2 + c2)
d = tan (asin((a2 + c2) / ((a2 + c2) + 0.5. 10-2n ))) / 10n (22)
We can chose the number of correct decimals precision using an appropriate
value of n.
In general we can replace x by any function f(x) and if the function f(x) contain also
square root we can replace it also by one of the equation of x
(f(x))= 1/(10n acos(f(x) / (f(x) + 0.5. 10-2n ))) (23)
4. Discussion
The formulas (5,6,7,8,9,10) are correct up to 2n decimals output of the square root
calculation x, as shown in table (2) and paragraph (3.2.), so 10n as an input value
will control the precision of the output value of x, the trigonometric function should
be calculated with high precision, which mean just correctly, with higher correct
decimals calculation precision [3], because the numerical accuracy of the functions
"asin" near −π/2 and π/2 and "acos" near 0 and π is ill-conditioned and will thus
calculate the angle with reduced accuracy in a computer implementation (due to the
limited number of decimals) [4]
The formulas (9,10) are the simplest formula for calculation because they use one
function which reduce calculation time and increase efficiency.
Our square root x calculation is limited to 2n precision so it is not important to
consider number after that. And there is no limit to expand the precision calculation
by just increasing n value and thus 10n value.
Many commercial programs limits the accuracy to 15 correct decimals and round or
discard the small part 0.5. 10-2n and 0.5. 10-n especially for big value of n which will
yield in a wrong results using the above formulas for n > 3, and for big numbers, so it
is very important to keep the terms 0.5. 10-2n and 0.5. 10-n without rounding
especially for n > 3 and use a high precision calculation programs for the
trigonometric functions to ensure the correct results of the square root formulas with
2n number of correct decimals precision.
It is possible to use another number as a precision factor that lead to different pattern
which may be instable, but I found that 10n is the simplest number for calculation that
gives always a stable and accurate results.
These formulas are dynamic and realistic and practical because in practice the number
of correct decimals are always fixed and limited whatever the method chosen to
calculate the square root and even if we know exactly all the correct decimals.
It is possible to divide x by a precision factor with or without multiplying x by the
precision factor, but I found from numerical analysis that the above method is the best
and most stable and the simplest which is an important feature to consider.
It is possible to replace x function by one of the formulas (5,6,7,8,9,10) above as
shown by an example in paragraph (3.4.) according to a chosen accuracy and correct
decimals output and perform calculation and mathematical operations
5. Conclusion
The formulas of the square root (5,6,7,8,9,10) are not a calculation method only they
are mathematic law that illustrate the incontestable relation between the square root
and the trigonometric function according to a specific pattern, they can replace the
square root function in any equation for a chosen precision for any application, and
can be used to calculate precisely and efficiently the square root of any real positive
number at any chosen precision and number of correct decimals, which is certainly an
excellent and more efficient substitute to the existing methods and algorithms of
square root calculations, for an initial fixed and limited number of correct decimals,
that could be expanded indefinitely, the small term 0.5. 10-2n in the above formulas,
which is usually discarded by the most scientific minds, is very important and should
not anymore rounded or discarded now in any case to perform the correct
calculations, the limited use of correct decimals is a calculation method adopted in all
scientific and engineering fields for calculations. These formulas are a new tool for
mathematicians, engineers and scientists that I suggest to use in future and study the
applications of these formulas and explore how they are useful and practical and
conclude advantages and features since the applications of the square root is very vast,
I hope that it will make a progress for calculations and mathematical analysis.
Acknowledgement
I am an independent researcher and a professional solution provider,
Funding
This research did not receive any specific grant from funding agencies in the public,
commercial, or not-for-profit sectors.
Declarations of interest: none
References
[1] Methods of computing square roots.
https://en.wikipedia.org/wiki/Methods_of_computing_square_roots
access date December 3 2018
[2] Pythagorean theorem. https://en.wikipedia.org/wiki/Pythagorean_theorem
access date December 3 2018
[3] List of trigonometric identities.
https://en.wikipedia.org/wiki/List_of_trigonometric_identities
access date December 3 2018
[4] Inverse trigonometric functions.
https://en.wikipedia.org/wiki/Inverse_trigonometric_functions
access date December 3 2018
[5] Root-finding. http://mathworld.wolfram.com/topics/Root-Finding.html
access date December 3 2018
[6] Root-finding algorithm. https://en.wikipedia.org/wiki/Root-finding_algorithm
access date December 3 2018
[7] Newton method. https://en.wikipedia.org/wiki/Newton%27s_method
access date December 3 2018
[8] Newton method. https://www.encyclopediaofmath.org/index.php/Newton_method
access date December 3 2018
[9] wolframalpha. https://www.wolframalpha.com/
access date December 3 2018
ResearchGate has not been able to resolve any citations for this publication.
ResearchGate has not been able to resolve any references for this publication.