Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Trigonometric tables
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== A quick, but inaccurate, approximation == A quick, but inaccurate, algorithm for calculating a table of ''N'' approximations ''s''<sub>''n''</sub> for [[sine|sin]](2[[Pi|π]]''n''/''N'') and ''c''<sub>''n''</sub> for [[cosine|cos]](2Ο''n''/''N'') is: :''s''<sub>0</sub> = 0 :''c''<sub>0</sub> = 1 :''s''<sub>''n''+1</sub> = ''s''<sub>''n''</sub> + ''d'' × ''c''<sub>''n''</sub> :''c''<sub>''n''+1</sub> = ''c''<sub>''n''</sub> − ''d'' × ''s''<sub>''n''</sub> for ''n'' = 0,...,''N'' − 1, where ''d'' = 2Ο/''N''. This is simply the [[Numerical ordinary differential equations#Euler method|Euler method]] for integrating the [[differential equation]]: :<math>ds/dt = c</math> :<math>dc/dt = -s</math> with initial conditions ''s''(0) = 0 and ''c''(0) = 1, whose analytical solution is ''s'' = sin(''t'') and ''c'' = cos(''t''). Unfortunately, this is not a useful algorithm for generating sine tables because it has a significant error, proportional to 1/''N''. For example, for ''N'' = 256 the maximum error in the sine values is ~0.061 (''s''<sub>202</sub> = −1.0368 instead of −0.9757). For ''N'' = 1024, the maximum error in the sine values is ~0.015 (''s''<sub>803</sub> = −0.99321 instead of −0.97832), about 4 times smaller. If the sine and cosine values obtained were to be plotted, this algorithm would draw a [[logarithmic spiral]] rather than a circle.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)