Nash - Scientific Computing with PCs (523165), страница 3
Текст из файла (страница 3)
That is, success in obtaining reasonableresults is not necessarily a sign that the calculation has been correctly performed. Worse, correctperformance in a number of cases may only lead to a false sense of confidence in a program destined togive erroneous output in a future calculation. If this output is the basis of decisions — businessinvestment, government policy, vehicle design or aircraft navigation — we have the seeds of catastrophe.With increasing reliance on computations and simulations in all fields of human endeavor, the possibilityand likelihood of occurrence of disasters large, and small, because of software failure, are an unfortunatereality in all our lives. We address such topics in our related work on technological risks.One objective, then, of this book is the realistic evaluation of what may be accomplished with thecomputers that are commonly available to those of us who must perform calculations.The second concern is the choice of strategies and tactics to make the most of the capabilities whileavoiding or overcoming the limitations, diversity or inconsistency.
Much of this material is common toall computing and data processing, be it on large, general-purpose machines, PCs or even a calculator,pencil and paper. In this we wish to avoid gimmicks and tricks, instead emphasizing a scientific approach.That is, we test claims, measure performance, deepen our understanding of what works and what doesnot, gradually improving our computing tools and our abilities to use them as we develop a solution toa problem.A third goal will be avoiding unnecessary expense.
Those with money and time to throw away we thankfor buying our book. They need read no further. Others with slimmer budgets will hopefully find someuseful tips to keep costs down.In summary, this book is intended to be a guide and handbook to the calculation practitioner who mustproduce correct answers to problems that can be stated mathematically. With this in mind, an index isprovided to enable quick reference use of the material. It is our hope that the text is interesting,comprehensible, and informative to users.Having stated the goals of this book, it may be assumed that objectives left unmentioned will not bepursued.
However, the diverse and turbulent activity concerning PCs has created a climate where readersmay expect a different book from that which we have written. Therefore, a short list of topics that are notaddressed is presented here.•There is no comparative shopping guide to computer hardware, peripherals or software.
The examplesthat do appear are there to serve as illustrations of the text. One reason for not attempting such acatalog is that it is difficult to keep it accurate in detail as manufacturers make alterations and4Copyright © 1984, 1994 J C & M M NashSCIENTIFIC COMPUTING WITH PCsNash Information Services Inc., 1975 Bel Air Drive, Ottawa, ON K2C 0X1 CanadaCopy for:Dr. Dobb’s Journalintroduce their "new" products.
Another reason is that we prefer to write from experience, whichclearly cannot be products just released today.•There is no attempt to present mathematical software formally in this volume. In other works (NashJ C, 1990d; Nash J C and Walker-Smith, 1987; our magazine columns) we have discussed methods forsolution of many mathematical problems. We do, where appropriate, mention some sources andexamples of mathematical software. We point to sources and advice on their use, but do not includemachine readable software.•There is no attempt to provide an all-purpose handbook for every PC owner. While we sincerely feelthere are useful ideas here for all who work with computers, the focus is on calculation and itspractitioners as described below.1.3The Scientific Method and Our AudienceIn all technical fields of endeavor, quantitative methods are assuming an increasing importance and use.Heightening our understanding of phenomena, natural or man-made, quantitative measures bring a levelof detail compared to simple qualitative descriptions of observed objects or events.
In businessdecision-making, numerical rather than descriptive information is vital. In engineering, accuratecalculations of the strengths of structures and materials are important in saving millions of dollars inunnecessary effort and fabric, while at the same time such results are critical to the integrity and safetyof the structures built.Quantitative methods are an outgrowth of the scientific method, which may be summarized as follows:•Careful observation of the system of interest;•Formulation of a model explaining the system’s behavior;•Testing of the model by comparison of its behavior with that of the real system;•Further observation, model refinement and testing.From the natural sciences, the scientific method has in recent years spread to social sciences and business.Not all applications have been either well-founded or well-executed, especially when the scientific methodis taken to imply the use of a computer model.
Models are popular because they are much less costly thanexperiments or prototypes. Their limitations derive from our imperfect understanding or poorapproximation of the system in question. In a social model of consumer buying habits, we may be contentwith very rough indicators of how a large group of people react to changes in prices or policies, since thealternative is a complete lack of information. For aircraft flight simulation, however, we wish to mimicthe behavior of an airplane very precisely so that the pilot can practice maneuvers without risk to life orproperty, while saving fuel and avoiding airport charges.Models and related quantitative methods (the spectrum of statistical and data analysis tools) requirecalculations to be performed.
It is to those who must carry out these calculations that this book is directed.The special interest is PCs, because calculations are increasingly being carried out in such computingenvironments.1.4Computer Configurations of InterestPCs may be purchased with an extremely wide range of options and it is necessary to define the type ofmachine that is the focus of this book.For our purposes, we will be interested in machines that are can carry out serious computations, whichimplies they must be able to run reasonably sophisticated software. The key word here is "reasonably."In 1980, such software was operated in a machine with a processor, memory, video display and keyboard,1: INTRODUCTION AND PURPOSE5with 5.25 inch floppy disks for information storage.
By the beginning of the 1990s, a fast fixed disk hadbecome more or less essential, in addition to the floppy disks (now 5.25 inches and 3.5 inches) that areused as a medium for supply and exchange of data or programs. Furthermore, a large enough mainmemory size is likely to be important so that scientific problems involving matrices and vectors can besolved without heroic measures to manipulate memory and disk space.To the basic machine, we would generally add a printer, which should support some form of graphicaloutput so that the user can plot as well as print information.
This implies some form of dot-matrix printer,or its higher-resolution cousins, the laser or ink-jet printer. We also believe communications with theoutside world are important. If telephone lines are the means of communication, then a modem is needed(Section 2.2).The above requirements can be met by many different examples of machines in the IBM PC andMacintosh families.1.5Computing StylesThroughout this book we will discuss ideas that relate to computing style.
That is, we will be interestedin how users get the job done, with the "job" referring to scientific computations and related dataprocessing. Our experience has been that, even in the physical sciences, style counts as much as substance.Scientists, engineers, economists and statisticians can easily get as excited or angry about cosmetic detailsas about fundamental theories. In this we are as guilty as others. For example, we do not particularly likemouse-controlled interfaces, though we have colleagues who swear they are the only reasonable approach.We hope readers will find our treatment "permissive," allowing each user to select his/her own preferredmode of operation.Style also refers to the choices of what parts of one’s work are performed with a PC.
Some users employjust one computing platform, their PC. However, most scientists use more than one computer for theirwork and we will try to point out the major advantages and pitfalls of multiple platform computing aswe proceed. In particular, we will try to raise alarms about situations where data might be awkward totransfer between platforms. Such "glitches" invariably cause great consternation. After all, the data is "righthere on this diskette," yet neither action, prayer nor curses will release it.At the same time, we will try to encourage users to maintain their data and program resources in a statewhere they can be moved across machine boundaries and shared with others. The synergy that resultswhen like-minded researchers can easily exchange ideas and information is of immense value.
In our ownexperience it is highly rewarding, at times accompanied by moments of scintillating intellectual insightthat would never arise without the interaction of other workers.Previous6Copyright © 1984, 1994 J C & M M NashHomeSCIENTIFIC COMPUTING WITH PCsNash Information Services Inc., 1975 Bel Air Drive, Ottawa, ON K2C 0X1 CanadaCopy for:Dr. Dobb’s JournalChapter 2Data processing capabilities of PCs2.12.22.32.42.52.62.72.82.92.10Non-mathematical data processing related to calculationCommunications — Access to remote dataAutomated data collectionInput, output, edit, and selectionScientific text processingMacro-editors and data convertersGraphicsReport writersProgramming and program developmentAdministration of researchThis chapter concerns the data processing tasks that do not generally involve arithmetic.