8 - Programming
Published online by Cambridge University Press: 05 June 2012
Summary
Introduction
When you put several commands together to accomplish some purpose beyond the capacity of any one individually, you are programming. Mathematica is intentionally designed for this purpose. Like anything else, getting good at programming takes practice. But it is also exceedingly handy to have familiarity with commands that lend themselves to such greater enterprises. We've seen plenty of Mathematica in the first seven chapters; in this chapter we'll discuss commands that are especially useful for programming. Keep in mind that we only have room here for a brief introduction to these concepts. Entire books, much longer than this one, have been written on this subject. Think of this chapter as a gentle introduction.
We begin in Section 8.2 with some important background material, a consideration of the internal form of any and every Mathematica expression. Every expression, input, output (or a cell, or an entire notebook) is highly structured. Before it is possible to operate on any such expression, you simply have to know what you are dealing with. You have to understand its structure.
Some of the most fundamental structures in Mathematica are the various types of numbers. These are addressed in Section 8.3. The internal forms of the various types of numbers are discussed, along with notions such as precision and accuracy. Mathematica has the capacity to carry out calculations to arbitrarily high precision. In this section we also discuss a myriad of possibilities for the display of numbers.
- Type
- Chapter
- Information
- The Student's Introduction to MATHEMATICA ®A Handbook for Precalculus, Calculus, and Linear Algebra, pp. 385 - 460Publisher: Cambridge University PressPrint publication year: 2009