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 to compute sum of angles from sine and cossine?
Counting trig ops as measure() function to fu() in sympy
Find a coordinate along a path
Angle calculation resulting in strange behavior
Shift angle orientation using atan2
estimate angle between two lines y = 1000x and y = 999x
Need help revising a simple formula to make it universal
SWIFT trig functions
Simplifying atan(tan(a+b))
2 Different Radians constant calcuations whats the difference?
Trigonometry & Sunset
Calculating collisions with Radians incrementing
How do arbitrary-precision libraries like mpmath evaluate simple trigonometric functions?
How can I calculate the angle
Finding Shortest Distance Between Two Parallel Lines, With Arbitrary Point [closed]
how to convert depth in Z-cordinate

Categories

HOME
django
twitter-bootstrap-3
apache-jena
webdriver
fpga
github-for-windows
redux-form
flex
zend-framework
solver
google-cloud-functions
database-normalization
vsm
python-multithreading
iis-6
pattern-matching
octave
naivebayes
atlassian
imessage
google-container-registry
foreign-keys
bourbon
selinux
simpleitk
breadth-first-search
babel
dataflow-diagram
angular-routing
interpreter
perlbrew
jboss6.x
syntax-highlighting
outliers
utorrent
dumpbin
memory-address
activexobject
pdw-file-browser
arduino-ide
imx6
latitude-longitude
reactivekit
sim-card
branching-and-merging
file-sharing
nanoc
libgphoto2
edit
filehandle
sundials
er-diagram
rmongo
gets
node-request
pure-css
custom-lists
lrs
beamer
cassia
lua-telegram-bot
tracker-enabled-dbcontext
exim4
jnlua
terracotta
jdi
.bash-profile
visual-sourcesafe-2005
apache-commons-daemon
gamekit
cross-join
administration
post-commit-hook
punycode
webfinger
cbind
encryption-asymmetric
create.js
build-script
ora-00904
functional-java
tinyxml
decoupling
android-usb
bin
neos-server
pclzip
cardreader
twisted.web
pstack
vfs
subproject
isa-swizzling
pinch
denied
landscape-portrait
tmx
cdonts
nhprof
facebook-iframe
application-verifier
application-planning
product-management
lemmatization
contentpresenter

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