Question: double func(x) double x; { double f; f = 1.0-cos(x); return f; } double gunc(x) double x; { double s, g; s = sin(0.5*x); g

double func(x) double x; { double f; f = 1.0-cos(x); return f; } double gunc(x) double x; { double s, g; s = sin(0.5*x); g = 2.0*s*s; return g; }4. For the three numbers a = X + b = TT = 10-9 evaluate analytically the relative error ed on the three numerically calculated numbers d = (a + b) + c, d2 = (c+a) +b, and d3 (b + c) + a as a function of x (2= 1) such that = = = = = = di d1(1 + Edi) d* d2(1 + Ed2) d* d3(1 + Ed3) You should take into account that a* a(1+Ea), b* = 5(1+Eb), c* = c(1+c) with Ea,b,c being the magnitude of the machine error eo. The value e is given by ln e = 1. , 5. Modify the code to investigate and validate the result from question 4 for -1
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
