J
John Smith
I just broke up with my girlfriend, so, to sublimate my sexual tensions,
I began reading this:
http://forensics.calcinfo.com/
This guy has developed a method that he uses to determine chip lineage
in old calculators (he needs a girlfriend too). Various chips will
produce various results when you make this calculation:
n = sin(cos(tan(atan(acos(asin(9.0)))))) in degrees.
With the Windows calculator I get the following results starting with
sin(9.0)in degree mode:
0.156434465040230869010105319467167
0.99999627274288502411751620501135
0.0174549998554886607913941409283485
0.99999627274288502411751620501135
0.156434465040230869010105319467167
9.00000000000000000000000000000003
I decided to try it with C's trig functions:
#include <stdio.h>
#include <math.h>
#define PI 3.14159265358979323846
#define DEG2RAD(DEG) ((DEG)*((PI)/(180.0)))
int main(void)
{
long double n;
n = sin(DEG2RAD(9.0));
printf("%.20Lf\n", n);
n = cos(DEG2RAD(n));
printf("%.20Lf\n", n);
n = tan(DEG2RAD(n));
printf("%.20Lf\n", n);
n = atan(DEG2RAD(n));
printf("%.20Lf\n", n);
n = acos(DEG2RAD(n));
printf("%.20Lf\n", n);
n = asin(DEG2RAD(n));
printf("%.20Lf\n", n);
/* final n = sin(cos(tan(atan(acos(asin(9.0)))))) */
return 0;
}
The program produces this output:
0.15643446504023086901
0.99999627274288502409
0.01745499985548866218
0.00030464720898864997
1.57079100969804273100
0.02741891042497898145
The first three values are OK, but when the inverse functions are
invoked it goes off the tracks. What's wrong?
I began reading this:
http://forensics.calcinfo.com/
This guy has developed a method that he uses to determine chip lineage
in old calculators (he needs a girlfriend too). Various chips will
produce various results when you make this calculation:
n = sin(cos(tan(atan(acos(asin(9.0)))))) in degrees.
With the Windows calculator I get the following results starting with
sin(9.0)in degree mode:
0.156434465040230869010105319467167
0.99999627274288502411751620501135
0.0174549998554886607913941409283485
0.99999627274288502411751620501135
0.156434465040230869010105319467167
9.00000000000000000000000000000003
I decided to try it with C's trig functions:
#include <stdio.h>
#include <math.h>
#define PI 3.14159265358979323846
#define DEG2RAD(DEG) ((DEG)*((PI)/(180.0)))
int main(void)
{
long double n;
n = sin(DEG2RAD(9.0));
printf("%.20Lf\n", n);
n = cos(DEG2RAD(n));
printf("%.20Lf\n", n);
n = tan(DEG2RAD(n));
printf("%.20Lf\n", n);
n = atan(DEG2RAD(n));
printf("%.20Lf\n", n);
n = acos(DEG2RAD(n));
printf("%.20Lf\n", n);
n = asin(DEG2RAD(n));
printf("%.20Lf\n", n);
/* final n = sin(cos(tan(atan(acos(asin(9.0)))))) */
return 0;
}
The program produces this output:
0.15643446504023086901
0.99999627274288502409
0.01745499985548866218
0.00030464720898864997
1.57079100969804273100
0.02741891042497898145
The first three values are OK, but when the inverse functions are
invoked it goes off the tracks. What's wrong?