Z
Z
zergon3212017-04-14 17:05:20
Mathematics
zergon321, 2017-04-14 17:05:20

Are there algorithms for arithmetic calculation of the natural logarithm and trigonometric functions?

Where can I see algorithms for calculating sin x, cos x and ln x and their implementation in programming languages? I found only documentation on various ready-made library functions (I need the calculation algorithms themselves, or at least the implementations themselves).

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
vaut, 2017-04-14
@zergon321

You can take the expansion in a Taylor series and already calculate it.

A
Alexander Skusnov, 2017-04-14
@AlexSku

CORDIC method
This is a compromise between table interpolation and functional counting.
And for what purpose are you looking for algorithms? Long ago I tried to speed up the graphics, but when I was convinced that the sine is considered quite fast, I did not reinvent the wheel.

D
d-stream, 2017-04-14
@d-stream

It's enough to open Wikipedia about sine: https://ru.wikipedia.org/wiki/%D0%A2%D1%80%D0%B8%D...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question