Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find the source code for math.h functions? [closed]

Tags:

c

math

glibc

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?

like image 464
Justin808 Avatar asked May 27 '17 03:05

Justin808


People also ask

What library is math h in?

h is a header file in the standard library of the C programming language designed for basic mathematical operations.

Is math H included by default?

h> is a header file, typically /usr/include/math. h . It's C source code that tells the compiler how to generate calls to pow and other functions. It should be available by default; all you need is #include <math.


1 Answers

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/

like image 98
Joni Avatar answered Oct 26 '22 22:10

Joni