

exp(1)

ans =

    2.7183

Euler1(1)

ans =

     2

Euler1(1/2)

ans =

    2.2500

Euler1(1/4)

ans =

    2.4414

Euler1(1/8)

ans =

    2.5658

Euler1(1/16)

ans =

    2.6379

Err = zeros(1,4)

Err =

     0     0     0     0

Err(1) = abs(exp(1)-Euler1(1))

Err =

    0.7183         0         0         0

Err(2) = abs(exp(1)-Euler1(1/2))

Err =

    0.7183    0.4683         0         0

Err(3) = abs(exp(1)-Euler1(1/4))

Err =

    0.7183    0.4683    0.2769         0

Err(4) = abs(exp(1)-Euler1(1/8))

Err =

    0.7183    0.4683    0.2769    0.1525

log2(Err(1)/Err(2))

ans =

    0.6172

log2(Err(2)/Err(3))

ans =

    0.7581

log2(Err(3)/Err(4))

ans =

    0.8605

