I read in an article somewhere that trig calculations are generally expensive. Is this true? And if so, that's why they use trig-lookup tables right?
EDIT: Hmm, so if the only thing that changes is the degrees (accurate to 1 degree), would a look up table with 360 entries (for every angle) be faster?
They are unique because the input is an angle measure, and the output is a ratio. The six trigonometric functions are sine, cosine, tangent, cosecant, secant, and cotangent.
However, trigonometry sums can be solved without the help of a calculator too. And though unbelievable, it's not as hard as it seems to be. All you have to do is use the Trigonometry table and you will be able to crack up most of the answers in a short time and let me tell you that it's even fun.
Trigonometry is a moderately hard branch of mathematics. The basic concepts in trigonometry are easy to understand. However, advanced topics in trigonometry such as trigonometric identities and Euler's formula are much more difficult.
Expensive is a relative term.
The mathematical operations that will perform fastest are those that can be performed directly by your processor. Certainly integer add and subtract will be among them. Depending upon the processor, there may be multiplication and division as well. Sometimes the processor (or a co-processor) can handle floating point operations natively.
More complicated things (e.g. square root) requires a series of these low-level calculations to be performed. These things are usually accomplished using math libraries (written on top of the native operations your processor can perform).
All of this happens very very fast these days, so "expensive" depends on how much of it you need to do, and how quickly you need it to happen.
If you're writing real-time 3D rendering software, then you may need to use lots of clever math tricks and shortcuts to squeeze every bit of speed out of your environment.
If you're working on typical business applications, odds are that the mathematical calculations you're doing won't contribute significantly to the overall performance of your system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With