c语言的suan和pow,请教一个关于 c语言 pow() 函数 的问题

pow

Calculates x raised to the power of y.

double pow( double x, double y );

Routine Required Header Compatibility

pow  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 

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 

#include 

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

Floating-Point Support Routines

See Also   exp, log, sqrt

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值