I have been given quite a theoretical question.
"What are the problems you may encounter when taking the product of 10 orders of differing orders of magnitude. What approach might you take to help ensure the numerical stability and accuracy of the product?"
I believe this is something to do with a rounding error that will get amplified each time there is a multiplication.
What can I do to solve this problem?
Am I on the right track or can anybody point me in the right direction?
Thanks
If you use a fixed-point representation, there is a serious danger of overflow or underflow. And if there are small values that do not cause underflow, they can cause severe loss of significant digits anyway.
The cure is to use a floating-point representation with a normalized mantissa, which will make the computation completely unsensitve to the orders of magnitude.