12.3 Numerical Issues
12.3.1 Problems in Disguise
Do we really need to understand how mathematical operations are carried out within a computer? Well, consider the situations depicted in Figure 12.1:
In (a), we use the calculation (0 - X) to determine whether X has a negative value. The next example, (b), shows the output from a shaft angle sensor being fed to a control computer to provide data monitoring. In (c), a missile aimer measures the angle between a fixed reference point and a target aircraft in order to engage at the optimal launch angle. The final item, (d), is a simple mathematical statement in source code form.
If you are likely to work with these or similar applications, then you do need to know what happens during the number-crunching process. This is because there are disguised problems in all of these examples. For instance, in (a), the calculation may give a false result indicating...