Approximation of Sine function in Integer Forth
|
03-23-2022, 08:07 AM
Post: #14
|
|||
|
|||
RE: Approximation of Sine function in Integer Forth
Some time ago I had to draw a simple ascii-circle for some kind of "clock project" for an Arduino. The primary goal (on Arduinos) is to write codes with small footprint and sufficient precision. I used some kind of lookup table with 16 bytes only to calculate rough values for sine (and cosine).
Maybe this code snippet can give you another idea? You can save the division (/ 200) by expanding (and/or recalculating) the byte values to int values. Code:
Regards deetee |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)