Sorry for the lack of documentation. I hope the following is clear. Basically, I combined cos(x) and cosh(x) and used my HP-28S to obtain the required Taylor series.
Gerson.
3: 'COS(X)'
2: 'X'
1: 8
TAYLR => '1-.5*X^2+
4.16666666667E-2*X^4
-1.38888888889E-3*X^
6+2.48015873016E-5*X
^8'
3: 'COSH(X)'
2: 'X'
1: 8
TAYLR => '1+.5*X^2+
4.16666666667E-2*X^4
+1.38888888889E-3*X^
6+2.48015873016E-5*X
^8'
+ => '1-.5*X^2+
4.16666666667E-2*X^4
-1.38888888889E-3*X^
6+2.48015873016E-5*X
^8+
(1+.5*X^2+
4.16666666667E-2*X^4
+1.38888888889E-3*X^
6+2.48015873016E-5*X
^8)'
COLCT => '2+8.33333333334E-2*
X^4+4.96031746032E-5
*X^8'
That is,
cos(x) ~ 2 + x^4/12 + x^8/20160 - cosh(x),
which has been rewritten as
cos(x) ~ 2 + x^4/12(1 + x^4/12/140) - (e^x + 1/e^x)/2
This provides 9 digits of accuracy or so for |x|<=pi/4. So, the argument is first divided by 2
then a trigonometric identity is used:
cos(x) = 2*(cos(x/2))^2 -1
Finally, sin(x) is computed as
sin(x) = sqrt(1 - cos(x)^2)
The tables below give an idea of the overall accuracy.
An HP-32S-II has been used to simulate the hp-12c platinum results in the table below, so they may differ a little.
hp-12c platinum
x | sin(x) | cos(x) | tan(x) |
------+-------------+-------------+-------------+
1.57 | 0.999999683 | 0.000796326 | 1255.766602 |
1.50 | 0.997494987 | 0.070737201 | 14.10142002 |
1.00 | 0.841470985 | 0.540302306 | 1.557407725 |
0.50 | 0.479425539 | 0.877582562 | 0.546302490 |
0.00 | 0.000000000 | 1.000000000 | 0.000000000 |
x |sin(x*pi/180)|cos(x*pi/180)|tan(x*pi/180)|
------+-------------+-------------+-------------+
90.0 | 1.000000000 |-0.000000001*|-1492537313.*|
89.9 | 0.999998477 | 0.001745328 | 572.9574320 |
60.0 | 0.866025404 | 0.500000000 | 1.732050808 |
45.0 | 0.707106781 | 0.707106781 | 1.000000000 |
30.0 | 0.500000000 | 0.866025404 | 0.577350269 |
pi/180 = 1.745329252e-02
HP-15C
x(RAD)| sin(x) | cos(x) | tan(x) |
------+-------------+-------------+-------------+
1.57 | 0.999999683 | 0.000796327 | 1255.765591 |
1.50 | 0.997494987 | 0.070737202 | 14.10141995 |
1.00 | 0.841470985 | 0.540302306 | 1.557407725 |
0.50 | 0.479425539 | 0.877582562 | 0.546302490 |
0.00 | 0.000000000 | 1.000000000 | 0.000000000 |
x(DEG)| sin(x) | cos(x) | tan(x) |
------+-------------+-------------+-------------+
90.0 | 1.000000000 | 0.000000000 | 9.999999 99 |
89.9 | 0.999998477 | 0.001745328 | 572.9572134 |
60.0 | 0.866025404 | 0.500000000 | 1.732050808 |
45.0 | 0.707106781 | 0.707106781 | 1.000000000 |
30.0 | 0.500000000 | 0.866025404 | 0.577350269 |