Minimisation of absolute error during calculations with numbers in C++ or C | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Minimisation of absolute error during calculations with numbers in C++ or C

Is given the function f(x) = x + 1/x. The user inputs let's say "n" integer values x1, x2, ... xn and it is required to output the sum of values of the function for the inputed x-es with and absolute error not more than 10^(-9). Could u give me a clue or any idea how the method of solving such exercises looks like?

6th Oct 2019, 8:32 AM
Ledio Deda
Ledio Deda - avatar
1 Answer