trigonometry


Trigonometric Functions in Pseudo Code


I'm searching for Trigonometric Functions in Pseudo Code.
I'm Not good at mathematics, so I can't do much with the formulas in the Wikipedia.
Mainly I'm searching for Sine, Cosine, Tangent and the inverse functions (sin⁻¹, cos⁻¹, tan⁻¹) of them.
There are also other Trigonometric Functions. But for me the above are the most important.
If it is possible, I would be happy if in the pseudo code only variables, for, if, and operators (+, -, *, /, %, sqrt()) are used, because I do not have a library with advanced mathematics functions.
Trigonometry functions are Transcendental.
You cannot find an exact expression of them in term of polynomial algebra.
You can approximate them though.
The usual approach is to use periodicity and symmetry to reduce an angle α into and equivalent angle α′ such that sin(α) = sin(α′) but α′ ≪ α.
Simply put you reduce any angle into and angle in the first quadrant or similar, this is easier than it looks.
Once you have a small angle, you can use Taylor Series Expansion to compute the function up to a fixed error magnitude.
Here is a tutorial page.
Another approach is to use a lookup table.
This is especially useful when you can keep track of the required precision of the process and is very fast.
However it takes more memory and may give rise to a step-looking function.
Here an introductory page.
Another approach is to use CORDIC Algorithm, this is specially suited for hardware that lacks multiplication support (like some MIPS and ARM chips).
From Wikipedia:
CORDIC is generally faster than other approaches when a hardware multiplier is not available (e.g., a microcontroller) [...]
On the other hand, when a hardware multiplier is available (e.g., in a DSP microprocessor), table-lookup methods and power series are generally faster than CORDIC.

Related Links

How can I calculate the angle
Finding Shortest Distance Between Two Parallel Lines, With Arbitrary Point [closed]
how to convert depth in Z-cordinate
How can I simplify this expression with trigonometric in Maple?
Require trigonometry assistance with ship/wave movement
Trigonometry - Find where two curves intersect
How to calculate point 'along' unit circle radian [closed]
Issues with bullet entry points for “shoulder mounted” guns
Using the coordinates of two of a triangle's vertices to calculate the coordinates of the third
How to do the trig function Arc Cos (ACOS() in Excel) in MS-Access?
How to get the direction (angle) of rectangle after rotating it from a pivot point
How to calculate points of Chord
Is trigonometry computationally expensive?
draw lines protruding from a circle [closed]
Flipping an angle using radians
Trigonometrical ratios for angles higher than 360

Categories

HOME
google-app-engine
turing-machines
jax-rs
3d
devise
spring-data-mongodb
onclick
google-admin-sdk
elasticsearch-5
okhttp
resultset
code-generation
chargify
sigma.js
replication
ksh
spring-async
object-storage
gmock
roundup
delimiter
entity-relationship-model
firebase-analytics
browser-sync
twos-complement
installshield-le
baidu-map
getlasterror
servicestack-text
apiary.io
openerp-7
wurfl
zoomify
password-protection
xv6
levenshtein-distance
mesosphere
textsum
semantic-logging
context-sensitive-grammar
java-6
oracleclient
headless
filehandle
universal-analytics
mathcad
pocketsphinx-android
lrs
flex4.6
burrows-wheeler-transform
beamer
angular-ui-typeahead
database-relations
phpgrid
ascii-art
concurrentmodification
computer-architecture
intel-c++
jdk1.7
snoop
uvc
kubuntu
broadband
mmwormhole
document-repository
at-job
machine-instruction
jqmodal
cancellation
extjs2
decoupling
qscrollarea
hibernate-entitymanager
httponly
stress
procedures
landscape-portrait
filemerge
silent
globals
binomial-heap
entitykey

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App