Search code examples
cmathglibc

Where can I find the source code for the functions in math.h?


I want to see how math functions work, like sin, cos, tan, etc... Where can I find the source code? is it available locally or in the net?


Solution

  • fdlibm has pure C implementations of the math functions, with comments that explain the algorithms and give references for them. http://www.netlib.org/fdlibm/