C语言中的pow是什么意思?

如题所述

pow(a,b)的意思应该是a的b次方。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2013-04-13
原型:在TC2.0中原型为extern float pow(float x, float y); ,而在VC6.0中原型为double pow( double x, double y );
头文件:math.h/cmath(C++中)
功能:计算x的y次幂。
返回值:x应大于零,返回幂指数的结果。
返回类型:double型,int,float会给与警告!

采纳我哦本回答被网友采纳
第2个回答  推荐于2017-10-12
原型:在TC2.0中原型为extern float pow(float x, float y); ,而在VC6.0中原型为double pow( double x, double y );
头文件:math.h/cmath(C++中)
功能:计算x的y次幂。
返回值:x应大于零,返回幂指数的结果。
返回类型:double型,int,float会给与警告!
第3个回答  2013-04-14
幂运算Calculates x raised to the power of y.

详见:
double pow( double x, double y );

Routine Required Header Compatibility
pow <math.h> ANSI, Win 95, Win NT

For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBC.LIB Single thread static library, retail version
LIBCMT.LIB Multithread static library, retail version
MSVCRT.LIB Import library for MSVCRT.DLL, retail version

Return Value

pow returns the value of xy. No error message is printed on overflow or underflow.

Values of x and y Return Value of pow
x < > 0 and y = 0.0 1
x = 0.0 and y = 0.0 1
x = 0.0 and y < 0 INF

Parameters

x

Base

y

Exponent

Remarks

The pow function computes x raised to the power of y.

pow does not recognize integral floating-point values greater than 264, such as 1.0E100.

Example

/* POW.C
*
*/

#include <math.h>
#include <stdio.h>

void main( void )
{
double x = 2.0, y = 3.0, z;

z = pow( x, y );
printf( "%.1f to the power of %.1f is %.1f\n", x, y, z );
}

Output

2.0 to the power of 3.0 is 8.0
第4个回答  2015-09-17
原型:在TC2.0中原型为extern float pow(float x, float y);而在VC6.0中原型为double pow(double x, double y );
头文件:math.h/cmath(C++中)
功能:计算x的y次幂。
返回值:x应大于零,返回幂指数的结果。
返回类型:double型,int,float会给与警告!
相似回答