Diagram illustrating one radian of angular measurement. Arc of circle (red curved line with arrows) with length equal to radius of circle subtends one radian at center. In diagram above, length of radius = length of arc = 1. One radian
If you were a mathematician among the ancient Sumerians of the 3rd millennium BC and you were determined to define
the angle that could be adopted as a standard to be used by all users of trigonometry, you would probably suggest
the angle in an equilateral triangle.
This angle is easily defined, easily constructed, easily understood and easily reproduced. It would be easy to call
this angle the "natural" angle.
The numeral system used by the ancient Sumerians was Sexagesimal, also known as base 60, a numeral system with sixty as its base.
In practice the natural angle could be divided into 60 parts, now called degrees, and each degree could be divided into
60 parts, now called minutes, and so on.
Three equilateral triangles fit neatly into a semi-circle, hence 180 degrees in a semi-circle.
We know that
Therefore, should be or one half of our concept of the natural angle.
Whatever the natural angle might be, it has existed for billions of years, but it has come to light only in recent times
with invention of the calculus.
In mathematics, the arctangent series, traditionally called Gregory's series, is the Taylor series expansion at the origin of the arctangent function:
The following python code calculates
using Gregory's series:
Because the value is fairly large, calculation of arctan_x above required 34 operations
to produce result accurate to 16 places of decimals. The calculation did not converge quickly.
Python code below uses much smaller values of , and calculation of arctan_x for precision of 1001 is quite fast.
# python codedefcalculate_π(angleθ,tanθ):'''angleθ may be: "dD(27) / (2 ** (33))"tanθ may be: "0.00000_00000_54859_42797_ ..... _03540_9738"π = calculate_π (angleθ, tanθ) '''thisName='calculate_π (angleθ, tanθ) :'ifisinstance(angleθ,dD):passelifisinstance(angleθ,str):angleθ=eval(angleθ)else:({}[21])ifisinstance(tanθ,dD):passelifisinstance(tanθ,str):tanθ=dD(tanθ)else:({}[22])sum=X=x=tanθ;xx=x*x;multiplier=-1;count=status=0# x**3 x**5 x**7 x**9# y = x - ---- + ---- - ---- + ---- - ......# 3 5 7 9# # Each term in the sequence is roughly the previous term multiplied by x**2.# Each value of x contains 10 leading zeroes after decimal point.# Therefore, each term in the sequence is roughly the previous term with 20 more leading zeroes.# Each pass through main loop adds about 20 digits to current value of sum# and θ is calculated to precision of 1004 digits with about 50 passes through main loop.# forpinrange(3,200,2):# This is main loop.count+=1X*=xxaddendum=(multiplier*X)/psum+=addendumifabs(addendum)<Tolerance:status=1;breakmultiplier=-multiplierstatusor({}[23])print(thisName,'count =',count)π=sum*180/angleθdgt.prec=desired_precisionπ+=0# This forces π to adopt precision of desired_precision.dgt.prec=Precisionreturnπ# Calculate five values of π:values_of_π=[]forθ,tanθinvalues_of_θ_tanθ:π=calculate_π(θ,tanθ)values_of_π+=[π]
Each calculation of π required about 50 passes through main loop:
# python codeset_π=set(values_of_π)π,=set_π# Note the syntax. If length of set_π is not 1, this statement fails.format_string='''Length of list values_of_π = {}Length of set set_π = {}set_π = {}.....{}'''set_π_as_string=str(set_π)print(format_string.format(len(values_of_π),len(set_π),set_π_as_string[:42],set_π_as_string[-41:],))
Length of list values_of_π = 5
Length of set set_π = 1
set_π = {Decimal('3.141592653589793238462643383279.....12268066130019278766111959092164201989')}
Because all five calculated values of π are equal, there is very high probability that this value of π is accurate.