Answer the question
In order to leave comments, you need to log in
How to compare the accuracy of an analytical algorithm and its software implementation?
Hello!
Let's say there is some analytical algorithm that calculates something. Just an arithmetic algorithm: standard arithmetic operations, trigonometric operations, nothing else. There is its software implementation in the C language - that is, the same thing, but implemented in the programming language.
This algorithm is my diploma, and one of the requirements is to analyze the accuracy of the software implementation of the algorithm relative to its analytical version. Can you please tell me if there are any differences in accuracy and what they depend on? In which direction to dig? As far as I understand, it depends on the bitness of the processor, the types used and the amount of their memory in the program, etc.
Answer the question
In order to leave comments, you need to log in
Is there a subtraction of close numbers? Any cycles like high-order SLAEs and solving difurs? Alternating rows? If not, you can write that the contribution of machine arithmetic to the accuracy of the algorithm is negligible.
And if there is, you need to investigate who and how can multiply the rounding errors.
For the sake of experiment, you can also compare the results in float and double.
An example of an algorithm that is analytically stable but not computationally stable: e −x head-on for sufficiently large x. It is connected with the same subtraction of close numbers: the intermediate members of the series can be quite large, and as a result, 0.0 ... 01 comes out.
UPD. I found this book: info.alnam.ru/book_clm.php?id=26
Perhaps you want to compare the errors of the results of the algorithm? It's a whole topic. First, it is necessary to find out what error the computer introduces. Then apply the appropriate systematic error correction method. If it was not possible to remove this error, it must be at least somehow estimated. Here is a standard example:
> 0.1*0.2
< 0.020000000000000004
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question