Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > How to handle tan() in a table.
2011-09-22 15:52
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
2011-09-22 16:06
terric
Account closed

Registered: Feb 2009
Posts: 47
I am posting again.

What is the allowed values for tan, 0 =< range < (pi/2) ?
2011-09-22 16:21
McMeatLoaf

Registered: Jan 2005
Posts: 108
-(pi/2)< range <(pi/2)
2011-09-23 18:18
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
2011-09-23 18:30
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 ...)



RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
macx
Scrap/Genesis Project
Acidchild/Padua
Guests online: 80
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Mutetus  (9.7)
3 Jeroen Tel  (9.7)
4 Linus  (9.6)
5 Stinsen  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.053 sec.