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: 105
-(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
Didi/Laxity
Stainless Steel/F4CG
Sentinel/Excess/TREX
Guests online: 117
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Graphicians
1 Sulevi  (10)
2 Mirage  (9.8)
3 Lobo  (9.7)
4 Mikael  (9.7)
5 Archmage  (9.7)

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