Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is trigonometry computationally expensive?

Tags:

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?

like image 748
Dominic K Avatar asked Mar 19 '10 18:03

Dominic K


People also ask

How much is trigonometry Precalculus?

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.

Do you need a calculator for trigonometry?

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.

Is basic trigonometry hard?

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.


1 Answers

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.

like image 120
Scott Smith Avatar answered Sep 19 '22 12:09

Scott Smith