入参为实数。。
C interface:
float erfcxf(float x);
double erfcx(double x);
参数名 |
类型 |
描述 |
输入/输出 |
---|---|---|---|
x |
|
表示输入数据的浮点值。 |
输入 |
C: "km.h"
// print result printf("erfcx(0.0) = %.15f\n",erfcx(0.0)); printf("erfcx(-0.0) = %.15f\n",erfcx(-0.0)); printf("erfcx(0.25) = %.15f\n",erfcx(0.25)); printf("erfcx(-0.25) = %.15f\n",erfcx(-0.25)); printf("erfcx(0.5) = %.15f\n",erfcx(0.5)); printf("erfcx(-0.5) = %.15f\n",erfcx(-0.5)); printf("erfcx(1.0) = %.15f\n",erfcx(1.0)); printf("erfcx(-1.0) = %.15f\n",erfcx(-1.0)); printf("erfcx(2.0) = %.15f\n",erfcx(2.0)); printf("erfcx(-2.0) = %.15f\n",erfcx(-2.0)); printf("erfcx(INFINITY) = %.15f\n",erfcx(INFINITY)); printf("erfcx(-INFINITY) = %.15f\n",erfcx(-INFINITY)); printf("erfcx(NAN) = %.15f\n",erfcx(NAN)); printf("erfcx(-NAN) = %.15f\n",erfcx(-NAN)); /* * erfcx(0.0) = 1.000000000000000 * erfcx(-0.0) = 1.000000000000000 * erfcx(0.25) = 0.770346547730997 * erfcx(-0.25) = 1.358642370104722 * erfcx(0.5) = 0.615690344192926 * erfcx(-0.5) = 1.952360489182557 * erfcx(1.0) = 0.427583576155807 * erfcx(-1.0) = 5.008980080762283 * erfcx(2.0) = 0.255395676310506 * erfcx(-2.0) = 108.940904389977973 * erfcx(INFINITY) = 0.000000000000000 * erfcx(-INFINITY) = inf * erfcx(NAN) = nan * erfcx(-NAN) = -nan * * */