Where is pow function defined and implemented in C?

后端 未结 8 1006
生来不讨喜
生来不讨喜 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 12:03

    The actual implementation of pow may vary from compiler to compiler. Generally, math.h (or a vendor-specific file included by math.h) provides the prototype for pow (i.e., its declaration), but the implementation is buried in some library file such as libm.a. Depending on your compiler, the actual source code for pow or any other library function may not be available.

提交回复
热议问题