Re: C's trig functions
- From: Martin Ambuhl <mambuhl@xxxxxxxxxxxxx>
- Date: Tue, 26 Apr 2005 00:20:43 GMT
John Smith wrote the demented claim that:
#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)))))) */
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Do you really thing that
asin(acos(atan(tan(cos(sin(x)))))
is the same operationally as
sin(cos(tan(atan(acos(asin(x)))))?
.- References:
- C's trig functions
- From: John Smith
- C's trig functions
- Prev by Date: Re: struct type completion
- Next by Date: Re: Returning integer portion of double
- Previous by thread: Re: C's trig functions
- Next by thread: Returning integer portion of double
- Index(es):