I was attempting to convert polar coordinates into cartesian coordinates when I realized I needed to compute the cosinus factor.
For those who don't know what cosinus is: You could say it is a factor that tells you the size of a tangent depending on its angle relative to a
reference (that is, the size of the tangent when it's at 0°). For instance, let's say you head on a straight road toward south. But your friend
decide to head on another road, at the same speed (let's say 100mph), but straight toward south-east instead. Cosinus will let you know that after 1
hour, you will have travelled 100 miles toward the south while your friend will only have traveled 0.707106 of that distance toward the south,
meaning, he will have travelled only 70.716 miles toward the south, due to his 45° degree trajectory relative to yours.
Cosinus has applications in astronomy, navigation, home construction, many things.
The problem is, cosinus value for an angle is not computable - only computers can compute cosinus factor. The best mankind can do is make super-long
equations when they want to compute cosinus "by hand", and the result is always nothing more than an approximation.
As I often experience power failure, I decided to try and come up with a simple equation to approximatively compute cosinus... using normal current
angular degree units (90 degrees units per quarters of a circle; not the ancient radian thing). And, well, after a couple of months of tweaking and
comparing to a computer's computations, I came up with a fairly simple equation, which lets you approximate the cosinus with some accuracy... well,
its accuracy is not enough for astronomical purpose, though, but anyway, I'll let you guys take a look and decide about its level of accuracy.
So, my equation is:
1-((θ/5q - θ³R)θ)
or 1-((((θ÷5)xq)-(θ³xR))θ)... in which
-θ is the angle, in normal degrees (maximum of 90° - no need to convert to radians)
-q is equal to 0.000 758 496, and
-R is equal to 0.000 000 003 486 71.
And now I am going to show you the computation results which my very simple equation yields over 19 different angles. The left column will show you
the cosinus value my equation approximates to, while the right column will show you the true cosinus value as computed by computers. So it's
basically my approximation, vs computer's high-tech, foot-long, equations.
swan approx.: computer:
0°: 1.000000 1.000000
5°: 0.996209 0.996194
10°: 0.984864 0.984807
15°: 0.966044 0.965925
20°: 0.939878 0.939692
25°: 0.906549 0.906307
30°: 0.866294 0.866025
35°: 0.819400 0.819152
40°: 0.766207 0.766044
45°: 0.707106 0.707106
50°: 0.642543 0.642787
55°: 0.573015 0.573576
60°: 0.499070 0.500000
65°: 0.421310 0.422618
70°: 0.340389 0.342020
75°: 0.257013 0.258819
80°: 0.171940 0.173648
85°: 0.085981 0.087155
90°: -0.000000 0.000000
For those who would like to see the quantitive difference, between my simplified approximation equation and the truth as computed by computers, you
won't have to hunt for a calculator; here it is:
0°: 0.000000
5°: +0.000015
10°: +0.000057
15°: +0.000118
20°: +0.000185
25°: +0.000242
30°: +0.000269
35°: +0.000248
40°: +0.000162
45°: +0.000000
50°: -0.000243
55°: -0.000560
60°: -0.000929
65°: -0.001307
70°: -0.001630
75°: -0.001805
80°: -0.001707
85°: -0.001174
90°: -0.000000
So,... what do you guys think?
Swan