满意答案
nc6837562
2014.06.01
采纳率:56% 等级:10
已帮助:720人
float用printf("%f"来表示,double用printf("%ld"来表示。
把英文帮助找出来了,自己看看吧。
函数原型:
#include
double erfc(double x);
float erfcf(float x);
long double erfcl(long double x);
Link with -lm. 编译时需要链接 -lm
DESCRIPTION 说明
The erfc() function returns the complementary error function of x, that is, 1.0 - erf(x).
RETURN VALUE 返回值
On success, these functions return the complementary error function of x, a value in the range [0,2].
If x is a NaN, a NaN is returned.
If x is +0 or -0, 1 is returned.
If x is positive infinity, +0 is returned.
If x is negative infinity, +2 is returned.
If the function result underflows and produces an unrepresentable value, the return value is 0.0.
If the function result underflows but produces a representable (i.e., subnormal) value, that value is returned, and a range error occurs.追问: 我想实现这个误差函数计算出来的值付给amp这个变量,为什么amp=double erfc(double x); 提醒说错误呢
追答:写成amp = erfc(x);
x要先在前面已经赋值过。
追问: 可是提醒说erfc没有定义,我已经在前面加了头文件#include了,这是怎么回事啊,太纠结了
00分享举报