作者:夏云木子 1、
>> syms re(x) re(y) re(z)
>> input('计算相对误差:'),re(x)=10/1991,re(y)=0.0001/1.991,re(y)=0.0000001/0.0001991
所以可知re(y)最小,即y精度最高 2、
>> format short,A=sqrt(2)
>> format short e,B=sqrt(2)
>> format short g,C=sqrt(2)
>> format long,D=sqrt(2)
>> format long e,E=sqrt(2)
>> format long g,F=sqrt(2)
>> format bank,H=sqrt(2)
>> format hex,I=sqrt(2)
>> format +,J=sqrt(2)
>> format,K=sqrt(2)
3、
>> syms A
>> A=[sqrt(3) exp(7);sin(5) log(4)];vpa(pi*A,6)
4、1/6251-1/6252=1/6251*6252 5、 (1)1/(1+3x)-(1-x)/(1+x)=x*(3*x-1)/[(1+3*x)*(1+x)] (2) sqrt(x+1/x)-sqrt(x-1/x)=2/x/[sqrt(x-1/x)+sqrt(x+1/x)] (3) log10(x1)-log(x2)=log10(x1/x2) (4) [1-cos(2*x)]/x =x^2/factorial(2)-x^4/factorial(4)+x^6/factorial(6)-…
计算方法及其MATLAB实现第二章作业



