8. General Methods for Implementing Reliable and Correct Software

Bo Einarsson, Brian A. Wichmann, Kenneth W. Dritz, Craig C. Douglas, Hans Petter Langtangen, Van Snyder, Ronald F. Boisvert, Roldan Pozo · Society for Industrial and Applied Mathematics eBooks · 2005

The simplest and quickest way for a knowledgeable user to get accurate and reliable results is to use a standard package built in to a problem-solving environment (PSE), such as Maple, Mathematica, or MATLAB. Such environments have good data visualization facilities, which enables the problem area to be explored in depth. In some cases, the PSE route may not be appropriate, for instance, because the resulting code needs to be integrated into another system, there is a need to produce a specialized solution, very high performance is required, or there is a need for the code to be in a specific language. If you wish to program yourself it is advisable to use a programming language with some built-in security, like Ada 95, Fortran 95, or Java. Such languages protect the programmer against many mistakes and therefore enable a reliable solution to be developed quickly. In contrast, C provides very little protection, although its mathematical library now contains a few new functions, for example, log1p (x) =log (1+x) and expm1 (x) =exp (x) −1, with the purpose of avoiding common cases of cancellation. Fortran 77 cannot be recommended since it lacks the convenience of the current Fortran standard. An article which stresses the importance of type-safe languages is [492]; although that article is slanted toward security, much of its content also applies to accuracy and reliability. While spreadsheets are often very convenient for producing a quick solution to some simple problems, they cannot be recommended due to the inherent difficulties in maintaining such code. Also, specific systems like Excel lack a detailed semantic description necessary to ensure that software will always produce the desired result. For good accuracy and reliability it is also advisable to use high-quality software like BLAS and LAPACK, routines from TOMS or netlib, or one of the commercial libraries IMSL or NAG.

Read the paper · More papers on PaperTik