LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 518|回复: 1

指数用什么运算符

[复制链接]
发表于 2004-12-16 02:21:47 | 显示全部楼层 |阅读模式

e好像不好用
发表于 2004-12-16 08:51:23 | 显示全部楼层
double exp10 (double x)  Function

float exp10f (float x)  Function

long double exp10l (long double x)  Function

double pow10 (double x)  Function

float pow10f (float x)  Function

long double pow10l (long double x)  Function
These functions compute 10 raised to the power x. Mathematically, exp10 (x) is the same as exp (x * log (10)).
These functions are GNU extensions. The name exp10 is preferred, since it is analogous to exp and exp2.

double pow (double base, double power)  Function

float powf (float base, float power)  Function

long double powl (long double base, long double power)  Function
These are general exponentiation functions, returning base raised to power.
Mathematically, pow would return a complex number when base is negative and power is not an integral value. pow can't do that, so instead it signals a domain error. pow may also underflow or overflow the destination type.

连接时要加数学库,gcc -lm
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表