Where is pow function defined and implemented in C?

后端 未结 8 1014
生来不讨喜
生来不讨喜 2021-01-14 11:29

I read that the pow(double, double) function is defined in \"math.h\" but I can\'t find its declaration.

Does anybody know where this function declared? And where i

8条回答
  •  悲哀的现实
    2021-01-14 11:49

    Quite often, an include file such as will include other header files that actually declare the functions you would expect to see in . The idea is that the program gets what it expects when it includes , even if the actual function definitions are in some other header file.

    Finding the implementation of a standard library function such as pow() is quite another matter. You will have to dig up the source code to your C standard runtime library and find the implementation in there.

提交回复
热议问题