ScalingScaling is a very important thing to consider in mathematical computations on a computer. A computer stores floating point numbers with a limited precision because it uses a fixed number of bytes to store them. Consider for example the result of the following calculation: 1/3 In our metric system, the result of this computation can not be represented with a finate number of digits. The value is 0.3333333333333... with an infinite number of digits. Because a computer only has a certain presision, the result is stored with a finite number of digits. For regular floating point numbers this is about 15 digits, independent of its size. So this result would for example be stored as 0.333333333333333 on a computer. The computation of 100000000000000000/3 would be stored as 33333333333333300. In several cases, this is no problem. The stored value is close enough to the value that is needed. However, when doing calculations, problems can arise because of this. Especially if small and large values are added or subtracted from each other. In that case, the precision of the small number is lost. This can result in the effect that calculated values aren't correct anymore. The more floating point calculations are done, the more chance there is that numerical instability occurs and doing calculations with big and small numbers results in faster occurence of this effect. Then there is also the effect of accumulating rounding errors which can result in a totally screwed up data matrix after having done several calculations. The simplex algorithm is a typical iterating process where factors of thousands of floating calculations are done to find the optimal solution. The chance of numerical instability is then also quite big. There are several ways to cope with this and it starts with the input data. The chance for numerical instability and rounding errors is considerably larger when the input data contains both large and small numbers. So to improve stability, one must try to work with numbers that are somewhat in the same range. Ideally in the neighbourhood of 1. There are two ways to accomplish this. The first way is the modeller who must try to model
his problem in such a way. Don't use extra-ordinary large or small numbers if not needed. Try to
use numbers as close to 1 as possible. This is of course practically not easy, but it must be
considered. You can also multiply whole rows or columns with a number to accomplish this.
For example saying: |