zz from: bbs.itgoal.com/archiver/?tid-54045.html
函数digits(n) 可以将系统的运算精度调整为小数点后n位,但后面要加vpa
例如:
z = 1.0e-16
x = 1.0e+2
digits(14)
y = vpa(x*z+1)
uses 14-digit decimal arithmetic and returns
y =
1.0000000000000
Whereas
digits(15)
y = vpa(x*z+1)
used 15-digit decimal arithmetic and returns
y =
1.00000000000001