Question: single val and double val file needs to be imported NT .4 Problem 2 The infinite series f(n) = 2p=1(1/4) converges to the value of

single val and double val file needs to be imported
NT .4 Problem 2 The infinite series f(n) = 2p=1(1/4) converges to the value of *%90 as n approaches infinity. You are provided with two files: one of them contains 10,000 16-digit (or double) precision values, and the other contains the same values but now in 8-digit (or single) precision. Note that the values are needed for computing the given summation for n = 10,000, but they have been randomly shuffled. a) Write a Python script to compute the summation of the 10,000 shuffled values using single precision floating point numbers b) Repeat the computations in a) but first sort the values in ascending order c) Repeat a) and b) except now using the double precision floating point values d) Compute the true percent relative errors of the four different results against the theoretical true value for the infinite series e) Repeat a, b, c, d, but now using in-built sum () function and investigate the results f) What type of numerical error does this question illustrate? What is a viable remedy (or what are viable remedies) to this type of numerical error? NT .4 Problem 2 The infinite series f(n) = 2p=1(1/4) converges to the value of *%90 as n approaches infinity. You are provided with two files: one of them contains 10,000 16-digit (or double) precision values, and the other contains the same values but now in 8-digit (or single) precision. Note that the values are needed for computing the given summation for n = 10,000, but they have been randomly shuffled. a) Write a Python script to compute the summation of the 10,000 shuffled values using single precision floating point numbers b) Repeat the computations in a) but first sort the values in ascending order c) Repeat a) and b) except now using the double precision floating point values d) Compute the true percent relative errors of the four different results against the theoretical true value for the infinite series e) Repeat a, b, c, d, but now using in-built sum () function and investigate the results f) What type of numerical error does this question illustrate? What is a viable remedy (or what are viable remedies) to this type of numerical error
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
