C语言差的函数公式,在C语言中erfc函数怎么表示,也就是x的误差补偿函数,急求高人指点。。。...

博客内容涉及C语言编程中使用erfc函数的错误提示和解决方法。作者在尝试使用double类型的erfc函数时遇到了问题,错误提示erfc未定义。解决方案包括确保已正确包含头文件,并正确调用函数。此外,还提到了函数的返回值范围和可能的浮点数处理情况。
摘要由CSDN通过智能技术生成

满意答案

dcebd7a0de6265b6ccae5ead692f1eab.png

nc6837562

2014.06.01

dcebd7a0de6265b6ccae5ead692f1eab.png

采纳率: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分享举报

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值