c++ 乘方 怎么实现?
来源:百度知道 编辑:UC知道 时间:2024/07/16 13:11:46
幂运算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 va