凡被定义战俘功能和C实现? [英] Where is pow function defined and implemented in C?

查看:151
本文介绍了凡被定义战俘功能和C实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读了战俘(双,双)功​​能中的文件math.h中定义,但我找不到它的声明。

有谁知道这个功能的声明?并且它用C实现在哪里?

参考:


  

http://publications.gbdirect.co.uk/ C%5Fbook /第九章/数学%5Ffunctions.html



解决方案

很多时候,一个包含文件,如<文件math.h> 将包括其他头文件实际上宣告你希望在&LT看到的功能;文件math.h> 。我们的想法是,该方案得到什么,它预计,当它包括<文件math.h方式> ,即使实际的功能定义在其他一些头文件

找到一个标准库函数的实施的如 POW()完全是另一回事。你将不得不源$ C ​​$ C挖掘到C标准的运行时库,并找到实现在那里。

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 is it implemented in C?

Reference:

http://publications.gbdirect.co.uk/c%5Fbook/chapter9/maths%5Ffunctions.html

解决方案

Quite often, an include file such as <math.h> will include other header files that actually declare the functions you would expect to see in <math.h>. The idea is that the program gets what it expects when it includes <math.h>, 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.

这篇关于凡被定义战俘功能和C实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆