Question: 1 . Prove the following: ( a ) If a , b , c , d are machine numbers show that a b and c
Prove the following:
a If a b c d are machine numbers show that
a b and c d implies fla c flb d
b If x is a machine number then show flxx assuming that there is no overflow. The same is also true for the division. Hint: consider the binary representation of x
c Construct a counterexample to show that the associative property of the addition does not hold for floating point numbers.
Implement the following algorithm in Python. In each iteration print x with decimal digits, and run your code for n In exactinfinite precision arithmetic the result should always be x Try your code with the following values m Can you explain the complete loss of accuracy after few iterations for m Why the last choice m is not suffering from the same catastrophic behaviour? Recall that in Python the standard representation of numbers is with double precision
Choose m and n
Set x : m m
for k n do
printx
x :x m
end
Consider the positive solution of the equation which is the golden ratio To approximate we consider the following three, mathematically equivalent, iterative algorithms
Algr : k sqrt k k
Algr : kk k
Algr : k k k
Implement each algorithm in Python and compute the absolute and relative errors Ek k Rk Ek respectively, for k Derive for each algorithm an approximate formula for the ratio EkEk and verify your findings numerically. Which of the algorithms are appropriate, in terms of stability, for computing
The Bessel functions of order satisfy the recurrence relation
Jnx Jnxn x Jnx n
Assume that we want to compute the sequence J J J given the values of J and J Compute these values with a Python program which uses the recurrence above and compare with the exact values computed by the Python function jv in scipy.special. Are the values computed by the recurrence formula accurate? What are the errors? What do you think is to blame?
A loan of A euros is paid back in n equal monthly instalments of M euros each. If r is the monthly interest rate then Ar M rn Take A M n and propose a method for finding the interest rate r
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
