((1.-3./x+3./x/x)-(1.+3./x+3./x/x)*exp(-2*x))/x2;
x = 0.001
精确值:0.000000066600038079
计算值: 0.000000000000000000
(1-3./x+3/x/x) (1+3./x+3/x/x)*exp(-2.*x)
精确值:2997001.000000000000000000 2997000.999999999866799923
计算值:2997001.000000000000000000 2997001.000000000000000000
(1+3./x+3/x/x) exp(-2.*x) (1+3./x+3/x/x)*exp(-2.*x)
精确值: 3003001.000000000000000000 0.998001998667333067 2997000.999999999866799923
计算值: 3003001.000000000000000000 0.998001998667333079 2997001.000000000000000000
granvia 发表于 2018-9-22 14:03
验证了一下,用Taylor展开exp(-2*x)前4项得到的表达式是:x^2/15*(2*x^2+x+1) = 6.67334666666667e-08
而 ...
欢迎光临 计算化学公社 (http://bbs.keinsci.com/) | Powered by Discuz! X3.3 |