根据lnx 的Maclaurin公式,求lnx=看看哪里错了啊 #include#includevoid main(){ double y=0;double k;const double e =1E-8;for (int i=1; ; i++){double x;double k;k=x-1;coutx;double d =pow((-1),i-1)*pow(k,i)/i; y=y+d;if (fabs(d)
来源:学生作业帮助网 编辑:作业帮 时间:2024/09/05 06:36:22
![根据lnx 的Maclaurin公式,求lnx=看看哪里错了啊 #include#includevoid main(){ double y=0;double k;const double e =1E-8;for (int i=1; ; i++){double x;double k;k=x-1;coutx;double d =pow((-1),i-1)*pow(k,i)/i; y=y+d;if (fabs(d)](/uploads/image/z/12682737-9-7.jpg?t=%E6%A0%B9%E6%8D%AElnx+%E7%9A%84Maclaurin%E5%85%AC%E5%BC%8F%2C%E6%B1%82lnx%3D%E7%9C%8B%E7%9C%8B%E5%93%AA%E9%87%8C%E9%94%99%E4%BA%86%E5%95%8A+%23include%23includevoid+main%28%29%7B+double+y%3D0%3Bdouble+k%3Bconst+double+e+%3D1E-8%3Bfor+%28int+i%3D1%3B+%3B+i%2B%2B%29%7Bdouble+x%3Bdouble+k%3Bk%3Dx-1%3Bcoutx%3Bdouble+d+%3Dpow%28%28-1%29%2Ci-1%29%2Apow%28k%2Ci%29%2Fi%3B+y%3Dy%2Bd%3Bif+%28fabs%28d%29)
x){`u9y
g&&$e=m]tOγM@sU/{^NdWө]
ʙy9)0,?3E!713OCZ!%4)'U̶N+.ɤ*ZX)hd(dZ+X+djkkVCT fVM(-(khjd -/['SS?hqvufFZbRFMR>Q+c̻ QB,5<2b$