| |
terric Account closed
Registered: Feb 2009 Posts: 47 |
How to handle tan() in a table.
Hi
Yes, recently i thought i should implement the table of tan()
in my code.
But i have no idea how to implement it.
The problem starts when i should store it and i had a look on a plotting-calculator, the curve has some very high climb now and then.
Would appreciate any help or question to rephrase my question or to enlighten some things about the question,
Maybe some day a coder see why tan() could come handy. :)
terric |
|
| |
terric Account closed
Registered: Feb 2009 Posts: 47 |
I am posting again.
What is the allowed values for tan, 0 =< range < (pi/2) ?
|
| |
McMeatLoaf
Registered: Jan 2005 Posts: 108 |
-(pi/2)< range <(pi/2) |
| |
terric Account closed
Registered: Feb 2009 Posts: 47 |
Well.
I went through a formula and tried to fix with some factors and then i came to the conclusion that tan won't fix it and making tan() as a table isn't especially easy if you compare it to sin() or cos().
:)
Now doing algebra etc. replacing cos(v) with sin(v+90) with cos(0)*sin(v). :)
Happy fishing. ;P
terric |
| |
Peiselulli
Registered: Oct 2006 Posts: 81 |
Mayby try it this way :
http://en.wikipedia.org/wiki/CORDIC
(I had implemented it on another processor without FPU 6 years ago ...)
|