View previous topic :: View next topic |
Author |
Message |
lanyong
Joined: 14 Jan 2004 Posts: 9 Location: Xiamen,Fujian Province, China
|
who can understand the c of atan(); ??? pls help |
Posted: Wed Feb 18, 2004 6:34 pm |
|
|
float const pat[4]={0.17630401, 5.6710795, 22.376096, 19.818457};
float const qat[4]={1.0000000, 11.368190, 28.982246, 19.818457};
float atan(float x)
{
float y,res,r;
int s,flag;
s=0; flag=0; y=x;
if (x < 0) { s=1; y=-y;}
if (y > 1.0) { y=1.0/y; flag=1; }
res = pat[0]*y*y + pat[1];
res = res*y*y + pat[2];
res = res*y*y + pat[3];
r = qat[0]*y*y + qat[1];
r = r*y*y + qat[2];
r = r*y*y + qat[3];
res = y*res/r;
if (flag) res = 1.57079633 - res; // for |x| > 1
if (s) res = -res;
return(res);
} _________________ Lan Yong |
|
![](templates/subSilver/images/spacer.gif) |
troky
Joined: 14 Dec 2003 Posts: 6
|
|
Posted: Thu Feb 19, 2004 6:16 pm |
|
|
It is based on Taylor series polynomial approximation... pure math.
Troky |
|
![](templates/subSilver/images/spacer.gif) |
lanyong
Joined: 14 Jan 2004 Posts: 9 Location: Xiamen,Fujian Province, China
|
thx:) |
Posted: Thu Feb 19, 2004 6:42 pm |
|
|
troky wrote: | It is based on Taylor series polynomial approximation... pure math.
Troky |
where i can find something of Taylor series polynomial approximation?
thx:)
see u later _________________ Lan Yong |
|
![](templates/subSilver/images/spacer.gif) |
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
|
|
Posted: Thu Feb 19, 2004 7:50 pm |
|
|
http://www.sosmath.com/calculus/tayser/tayser01/tayser01.html
And Google will generate as many more as you care to see...
Also if you have a university near by, a trip to their math & science library will bury you in Taylor Series information. _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month! |
|
![](templates/subSilver/images/spacer.gif) |
lanyong
Joined: 14 Jan 2004 Posts: 9 Location: Xiamen,Fujian Province, China
|
thank u very much! |
Posted: Thu Feb 19, 2004 9:17 pm |
|
|
u r so kind for me! thanks:)
i have learn the math in university, but i have forgot it:)
so sorry:)
thanks very much! _________________ Lan Yong |
|
![](templates/subSilver/images/spacer.gif) |
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
|
|
Posted: Fri Feb 20, 2004 8:51 am |
|
|
A classic case of "use it or loose it"!
When I think back on all the Calculus, Differential Equations, Matrix & Linear Algebra, and Statistics classes I had to take and then reflect on what I use daily it makes me sad. I could have spent those years drinking and chasing women in the college bars like the business majors! ![Wink](images/smiles/icon_wink.gif) _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month! |
|
![](templates/subSilver/images/spacer.gif) |
lanyong
Joined: 14 Jan 2004 Posts: 9 Location: Xiamen,Fujian Province, China
|
i can understand u a little |
Posted: Mon Feb 23, 2004 12:41 am |
|
|
rwyoung wrote: | A classic case of "use it or loose it"!
When I think back on all the Calculus, Differential Equations, Matrix & Linear Algebra, and Statistics classes I had to take and then reflect on what I use daily it makes me sad. I could have spent those years drinking and chasing women in the college bars like the business majors! ![Wink](images/smiles/icon_wink.gif) |
math is a tool, u can know it.
u should not know 1+1=?,u can know it by ur computer.
if there is no computer,u can use ur fingers to know it,before u know what "1+1=" means .
but before u use it(the math) ,u should know it is right or not. _________________ Lan Yong |
|
![](templates/subSilver/images/spacer.gif) |
|