lpetrich
Contributor
I did a lot of searching, and I found out How does C compute sin() and other math functions? - Stack Overflow
That led me to sourceware.org Git - glibc.git/tree - sysdeps/ieee754/dbl-64/
The source code was hard for me to interpret, but I recognized the use of Taylor series in various places. It could have used a *lot* of comments to give an overall picture of what is going on it it.
sourceware.org Git - glibc.git/tree - math/ - look at files names s_c<function>_template.c
sourceware.org Git - glibc.git/blob - math/s_cexp_template.c - has the algorithm that one would expect:
\( e^{x + i y} = e^x \cos y + i e^x \sin y \)
Similarly for the other complex math functions.
That led me to sourceware.org Git - glibc.git/tree - sysdeps/ieee754/dbl-64/
The source code was hard for me to interpret, but I recognized the use of Taylor series in various places. It could have used a *lot* of comments to give an overall picture of what is going on it it.
sourceware.org Git - glibc.git/tree - math/ - look at files names s_c<function>_template.c
sourceware.org Git - glibc.git/blob - math/s_cexp_template.c - has the algorithm that one would expect:
\( e^{x + i y} = e^x \cos y + i e^x \sin y \)
Similarly for the other complex math functions.